| # Copyright 2020 The Fuchsia Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| |
| import("//build/test.gni") |
| import("//src/lib/isolated_devmgr/v2_component/isolated_devmgr.gni") |
| import("//src/sys/build/fuchsia_component.gni") |
| import("//src/sys/build/fuchsia_test_package.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":fs-tests", |
| ":large-fs-tests", |
| "//src/lib/isolated_devmgr/v2_component", |
| ] |
| } |
| |
| static_library("fs_test") { |
| testonly = true |
| sources = [ |
| "fs_test.cc", |
| "fs_test_fixture.cc", |
| "misc.cc", |
| ] |
| deps = [ |
| "//sdk/fidl/fuchsia.fs", |
| "//sdk/lib/fdio", |
| "//sdk/lib/sys/cpp", |
| "//src/storage/fuchsia-fatfs:fatfs", |
| "//src/storage/fvm", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/block-client", |
| "//zircon/system/ulib/fdio-caller", |
| "//zircon/system/ulib/memfs", |
| ] |
| public_deps = [ |
| # fs_test.h: |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//src/lib/isolated_devmgr/v2_component:client", |
| "//src/storage/blobfs", |
| "//src/storage/minfs", |
| "//third_party/googletest:gtest", |
| "//zircon/public/lib/fbl", |
| "//zircon/public/lib/zx", |
| "//zircon/public/lib/zxc", |
| "//zircon/system/ulib/fs-management", |
| ] |
| } |
| |
| test("access_tests") { |
| sources = [ "access.cc" ] |
| deps = [ |
| ":fs_test", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/system/ulib/fdio-caller", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("access-tests") { |
| executable_path = "test/access_tests" |
| deps = [ ":access_tests" ] |
| } |
| |
| test("append_tests") { |
| sources = [ "append.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("append-tests") { |
| executable_path = "test/append_tests" |
| deps = [ ":append_tests" ] |
| } |
| |
| test("attr_tests") { |
| sources = [ "attr.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("attr-tests") { |
| executable_path = "test/attr_tests" |
| deps = [ ":attr_tests" ] |
| } |
| |
| test("basic_tests") { |
| sources = [ "basic.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("basic-tests") { |
| executable_path = "test/basic_tests" |
| deps = [ ":basic_tests" ] |
| } |
| |
| test("case_sensitivity_tests") { |
| sources = [ "case_sensitivity.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("case-sensitivity-tests") { |
| executable_path = "test/case_sensitivity_tests" |
| deps = [ ":case_sensitivity_tests" ] |
| } |
| |
| test("clone_tests") { |
| sources = [ "clone.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("clone-tests") { |
| executable_path = "test/clone_tests" |
| deps = [ ":clone_tests" ] |
| } |
| |
| test("corrupt_tests") { |
| sources = [ "corrupt.cc" ] |
| deps = [ |
| ":fs_test", |
| "//sdk/fidl/fuchsia.device:fuchsia.device_llcpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("corrupt-tests") { |
| executable_path = "test/corrupt_tests" |
| deps = [ ":corrupt_tests" ] |
| } |
| |
| test("directory_tests") { |
| sources = [ "directory.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("directory-tests") { |
| executable_path = "test/directory_tests" |
| deps = [ ":directory_tests" ] |
| } |
| |
| test("dot_dot_tests") { |
| sources = [ "dot_dot.cc" ] |
| deps = [ |
| ":fs_test", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/zx", |
| "//zircon/system/ulib/fdio-caller", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("dot-dot-tests") { |
| executable_path = "test/dot_dot_tests" |
| deps = [ ":dot_dot_tests" ] |
| } |
| |
| test("fcntl_tests") { |
| sources = [ "fcntl.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("fcntl-tests") { |
| executable_path = "test/fcntl_tests" |
| deps = [ ":fcntl_tests" ] |
| } |
| |
| test("filename_tests") { |
| sources = [ "filename.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("filename-tests") { |
| executable_path = "test/filename_tests" |
| deps = [ ":filename_tests" ] |
| } |
| |
| test("link_tests") { |
| sources = [ "link.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("link-tests") { |
| executable_path = "test/link_tests" |
| deps = [ ":link_tests" ] |
| } |
| |
| test("lseek_tests") { |
| sources = [ "lseek.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("lseek-tests") { |
| executable_path = "test/lseek_tests" |
| deps = [ ":lseek_tests" ] |
| } |
| |
| test("minfs_tests") { |
| sources = [ "minfs.cc" ] |
| deps = [ |
| ":fs_test", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//sdk/fidl/fuchsia.minfs:fuchsia.minfs_c", |
| "//sdk/lib/fdio", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/storage/fvm", |
| "//src/storage/minfs", |
| "//third_party/googletest:gmock", |
| "//zircon/system/ulib/fdio-caller", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("minfs-tests") { |
| executable_path = "test/minfs_tests" |
| deps = [ ":minfs_tests" ] |
| } |
| |
| test("mmap_tests") { |
| sources = [ "mmap.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gmock", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("mmap-tests") { |
| executable_path = "test/mmap_tests" |
| deps = [ ":mmap_tests" ] |
| } |
| |
| test("overflow_tests") { |
| sources = [ "overflow.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("overflow-tests") { |
| executable_path = "test/overflow_tests" |
| deps = [ ":overflow_tests" ] |
| } |
| |
| test("persist_tests") { |
| sources = [ "persist.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("persist-tests") { |
| executable_path = "test/persist_tests" |
| deps = [ ":persist_tests" ] |
| } |
| |
| test("random_op_tests") { |
| sources = [ "random_op.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("random-op-tests") { |
| executable_path = "test/random_op_tests" |
| deps = [ ":random_op_tests" ] |
| } |
| |
| test("realpath_tests") { |
| sources = [ "realpath.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("realpath-tests") { |
| executable_path = "test/realpath_tests" |
| deps = [ ":realpath_tests" ] |
| } |
| |
| test("rename_tests") { |
| sources = [ "rename.cc" ] |
| deps = [ |
| ":fs_test", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| "//zircon/system/ulib/fdio-caller", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("rename-tests") { |
| executable_path = "test/rename_tests" |
| deps = [ ":rename_tests" ] |
| } |
| |
| test("resize_tests") { |
| sources = [ "resize.cc" ] |
| deps = [ |
| ":fs_test", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/storage/fvm", |
| "//src/storage/minfs", |
| "//zircon/public/lib/fbl", |
| "//zircon/system/ulib/fdio-caller", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("resize-tests") { |
| executable_path = "test/resize_tests" |
| deps = [ ":resize_tests" ] |
| } |
| |
| test("rw_tests") { |
| sources = [ "rw.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("rw-tests") { |
| executable_path = "test/rw_tests" |
| deps = [ ":rw_tests" ] |
| } |
| |
| test("rw_workers_tests") { |
| sources = [ "rw_workers.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("rw-workers-tests") { |
| executable_path = "test/rw_workers_tests" |
| deps = [ ":rw_workers_tests" ] |
| } |
| |
| test("sparse_tests") { |
| sources = [ "sparse.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("sparse-tests") { |
| executable_path = "test/sparse_tests" |
| deps = [ ":sparse_tests" ] |
| } |
| |
| test("sync_tests") { |
| sources = [ "sync.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("sync-tests") { |
| executable_path = "test/sync_tests" |
| deps = [ ":sync_tests" ] |
| } |
| |
| test("threading_tests") { |
| sources = [ "threading.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("threading-tests") { |
| executable_path = "test/threading_tests" |
| deps = [ ":threading_tests" ] |
| } |
| |
| test("truncate_tests") { |
| sources = [ |
| "truncate.cc", |
| "truncate_fixture.cc", |
| ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("truncate-tests") { |
| executable_path = "test/truncate_tests" |
| deps = [ ":truncate_tests" ] |
| } |
| |
| test("unicode_tests") { |
| sources = [ "unicode.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("unicode-tests") { |
| executable_path = "test/unicode_tests" |
| deps = [ ":unicode_tests" ] |
| } |
| |
| test("unlink_tests") { |
| sources = [ "unlink.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("unlink-tests") { |
| executable_path = "test/unlink_tests" |
| deps = [ ":unlink_tests" ] |
| } |
| |
| test("watcher_tests") { |
| sources = [ "watcher.cc" ] |
| deps = [ |
| ":fs_test", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_llcpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| "//zircon/system/ulib/fdio-caller", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("watcher-tests") { |
| executable_path = "test/watcher_tests" |
| deps = [ ":watcher_tests" ] |
| } |
| |
| fuchsia_test_package("fs-tests") { |
| test_components = [ |
| ":access-tests", |
| ":append-tests", |
| ":attr-tests", |
| ":basic-tests", |
| ":case-sensitivity-tests", |
| ":clone-tests", |
| ":corrupt-tests", |
| ":directory-tests", |
| ":dot-dot-tests", |
| ":fcntl-tests", |
| ":filename-tests", |
| ":link-tests", |
| ":lseek-tests", |
| ":minfs-tests", |
| ":mmap-tests", |
| ":overflow-tests", |
| ":persist-tests", |
| ":random-op-tests", |
| ":realpath-tests", |
| ":rename-tests", |
| ":resize-tests", |
| ":rw-tests", |
| ":rw-workers-tests", |
| ":sparse-tests", |
| ":sync-tests", |
| ":threading-tests", |
| ":truncate-tests", |
| ":unicode-tests", |
| ":unlink-tests", |
| ":watcher-tests", |
| ] |
| } |
| |
| test("directory_large_tests") { |
| sources = [ "directory_large.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("directory-large-tests") { |
| executable_path = "test/directory_large_tests" |
| deps = [ ":directory_large_tests" ] |
| } |
| |
| test("max_file_tests") { |
| sources = [ "max_file.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("max-file-tests") { |
| executable_path = "test/max_file_tests" |
| deps = [ ":max_file_tests" ] |
| } |
| |
| test("sparse_large_tests") { |
| sources = [ "sparse_large.cc" ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("sparse-large-tests") { |
| executable_path = "test/sparse_large_tests" |
| deps = [ ":sparse_large_tests" ] |
| } |
| |
| test("truncate_large_tests") { |
| sources = [ |
| "truncate_fixture.cc", |
| "truncate_large.cc", |
| ] |
| deps = [ |
| ":fs_test", |
| "//src/lib/fxl/test:gtest_main", |
| "//zircon/public/lib/fbl", |
| ] |
| } |
| |
| isolated_devmgr_unittest_v2_component("truncate-large-tests") { |
| executable_path = "test/truncate_large_tests" |
| deps = [ ":truncate_large_tests" ] |
| } |
| |
| fuchsia_test_package("large-fs-tests") { |
| test_components = [ |
| ":directory-large-tests", |
| ":max-file-tests", |
| ":sparse-large-tests", |
| ":truncate-large-tests", |
| ] |
| test_specs = { |
| environments = [ |
| { |
| dimensions = emu_env.dimensions |
| tags = [ "slow" ] |
| }, |
| ] |
| } |
| } |