| { |
| include: [ |
| "//sdk/cts/test_realm/meta/cts_test_realm.shard.cml", |
| "//src/lib/fuchsia-component-test/meta/fuchsia_component_test.shard.cml", |
| "//src/lib/vulkan/vulkan_test_realm.shard.cml", |
| "syslog/client.shard.cml", |
| ], |
| program: { |
| runner: "elf", |
| binary: "bin/test_manager", |
| }, |
| children: [ |
| { |
| name: "elf_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/elf-test-runner#meta/elf-test-runner.cm", |
| }, |
| { |
| name: "elf_test_ambient_exec_runner", |
| url: "fuchsia-pkg://fuchsia.com/elf-test-ambient-exec-runner#meta/elf-test-ambient-exec-runner.cm", |
| }, |
| { |
| name: "gtest_runner", |
| url: "fuchsia-pkg://fuchsia.com/gtest-runner#meta/gtest-runner.cm", |
| }, |
| { |
| name: "legacy_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/legacy-test-runner#meta/legacy-test-runner.cm", |
| }, |
| { |
| name: "rust_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/rust-test-runner#meta/rust-test-runner.cm", |
| }, |
| { |
| name: "starnix_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/starnix-test-runner#meta/starnix_test_runner_parent.cm", |
| }, |
| { |
| name: "starnix_unit_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/starnix-test-runner#meta/starnix_unit_test_runner.cm", |
| }, |
| { |
| name: "go_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/go-test-runner#meta/go-test-runner.cm", |
| }, |
| { |
| name: "inspect_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/inspect-test-runner#meta/inspect-test-runner.cm", |
| }, |
| { |
| name: "stress_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/stress-test-runner#meta/stress-test-runner.cm", |
| }, |
| { |
| // This is not a test runner. This is used to run wrapped legacy |
| // component under tests. |
| name: "cmx_runner", |
| url: "#meta/cmx_runner.cm", |
| }, |
| { |
| name: "runner_memfs", |
| url: "fuchsia-pkg://fuchsia.com/test_manager#meta/memfs.cm", |
| }, |
| { |
| name: "test_tmpfs", |
| url: "fuchsia-pkg://fuchsia.com/test_manager#meta/memfs.cm", |
| }, |
| { |
| name: "debug_data", |
| url: "fuchsia-pkg://fuchsia.com/test_manager#meta/debug_data.cm", |
| }, |
| ], |
| collections: [ |
| { |
| name: "tests", |
| environment: "#test-env", |
| durability: "transient", |
| }, |
| { |
| name: "system-tests", |
| environment: "#test-env", |
| durability: "transient", |
| }, |
| ], |
| capabilities: [ |
| { |
| storage: "data", |
| from: "#runner_memfs", |
| backing_dir: "memfs", |
| storage_id: "static_instance_id_or_moniker", |
| }, |
| { |
| storage: "tmp", |
| from: "#test_tmpfs", |
| subdir: "tmp", |
| backing_dir: "memfs", |
| storage_id: "static_instance_id_or_moniker", |
| }, |
| { |
| storage: "cache", |
| from: "#test_tmpfs", |
| subdir: "cache", |
| backing_dir: "memfs", |
| storage_id: "static_instance_id_or_moniker", |
| }, |
| { |
| storage: "custom_artifacts", |
| from: "#test_tmpfs", |
| subdir: "custom_artifacts", |
| backing_dir: "memfs", |
| storage_id: "static_instance_id_or_moniker", |
| }, |
| { protocol: "fuchsia.test.manager.Query" }, |
| { protocol: "fuchsia.test.internal.Info" }, |
| { protocol: "fuchsia.test.manager.RunBuilder" }, |
| ], |
| use: [ |
| { |
| protocol: "fuchsia.component.Realm", |
| from: "framework", |
| }, |
| { protocol: "fuchsia.sys.Environment" }, |
| { protocol: "fuchsia.sys.Loader" }, |
| |
| // TODO(fxbug.dev/86464): Clean this up |
| { protocol: "fuchsia.sys2.ComponentResolver" }, |
| { |
| protocol: "fuchsia.sys2.StorageAdmin", |
| from: "#custom_artifacts", |
| }, |
| ], |
| offer: [ |
| { |
| protocol: [ |
| // Tests can write to debug logs |
| "fuchsia.boot.WriteOnlyLog", |
| "fuchsia.logger.LogSink", |
| "fuchsia.process.Launcher", |
| "fuchsia.sys2.EventSource", |
| |
| // Tests can produce trace. |
| "fuchsia.tracing.provider.Registry", |
| ], |
| from: "parent", |
| to: [ |
| "#system-tests", |
| "#tests", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.sys2.EventSource" ], |
| from: "parent", |
| to: "#debug_data", |
| }, |
| { |
| protocol: [ "fuchsia.test.internal.Info" ], |
| from: "self", |
| to: "#debug_data", |
| }, |
| |
| // These capabilities are offered for use by certain non-hermetic tests. |
| { |
| // update https://fuchsia.dev/fuchsia-src/concepts/testing/v2/test_runner_framework#legacy_non-hermetic_tests |
| // when this list is updated. |
| protocol: [ |
| "fuchsia.boot.ReadOnlyLog", |
| "fuchsia.boot.RootResource", |
| "fuchsia.exception.Handler", |
| "fuchsia.kernel.RootJobForInspect", |
| "fuchsia.kernel.Stats", |
| "fuchsia.kernel.VmexResource", |
| |
| // Needed for //src/cobalt/bin/meta/cobalt_testapp_for_prober_do_not_run_manually.cml |
| // TODO(fxbug.dev/83038): Remove once e2e is better supported. |
| "fuchsia.net.http.Loader", |
| "fuchsia.scheduler.ProfileProvider", |
| |
| // Needed for test_manager_tests and test runner tests. |
| // TODO(fxbug.dev/86464): Remove this once we have facet API. |
| "fuchsia.sys2.ComponentResolver", |
| "fuchsia.sysmem.Allocator", |
| "fuchsia.vulkan.loader.Loader", |
| ], |
| from: "parent", |
| to: "#system-tests", |
| }, |
| { |
| protocol: "fuchsia.logger.LogSink", |
| from: "parent", |
| to: [ |
| "#cmx_runner", |
| "#debug_data", |
| "#elf_test_ambient_exec_runner", |
| "#elf_test_runner", |
| "#go_test_runner", |
| "#gtest_runner", |
| "#inspect_test_runner", |
| "#legacy_test_runner", |
| "#runner_memfs", |
| "#rust_test_runner", |
| "#starnix_test_runner", |
| "#starnix_unit_test_runner", |
| "#stress_test_runner", |
| "#test_tmpfs", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.sys.Environment", |
| "fuchsia.sys.Loader", |
| ], |
| from: "parent", |
| to: [ |
| "#cmx_runner", |
| "#legacy_test_runner", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.kernel.VmexResource", |
| "fuchsia.sysmem.Allocator", |
| "fuchsia.tracing.provider.Registry", |
| "fuchsia.ui.composition.Allocator", |
| "fuchsia.ui.composition.Flatland", |
| "fuchsia.ui.input3.Keyboard", |
| "fuchsia.ui.scenic.Scenic", |
| "fuchsia.vulkan.loader.Loader", |
| ], |
| from: "parent", |
| to: [ |
| "#starnix_test_runner", |
| "#starnix_unit_test_runner", |
| ], |
| }, |
| { |
| protocol: "fuchsia.process.Launcher", |
| from: "parent", |
| to: [ |
| "#elf_test_ambient_exec_runner", |
| "#elf_test_runner", |
| "#go_test_runner", |
| "#gtest_runner", |
| "#rust_test_runner", |
| "#starnix_test_runner", |
| "#starnix_unit_test_runner", |
| ], |
| }, |
| { |
| event: "capability_requested", |
| from: "framework", |
| to: "#debug_data", |
| filter: { name: "fuchsia.debugdata.DebugData" }, |
| }, |
| { |
| protocol: "fuchsia.diagnostics.ArchiveAccessor", |
| from: "parent", |
| as: "fuchsia.diagnostics.RealArchiveAccessor", |
| to: [ "#inspect_test_runner" ], |
| }, |
| { |
| protocol: "fuchsia.diagnostics.FeedbackArchiveAccessor", |
| from: "parent", |
| as: "fuchsia.diagnostics.RealFeedbackArchiveAccessor", |
| to: [ "#inspect_test_runner" ], |
| }, |
| { |
| protocol: "fuchsia.diagnostics.LegacyMetricsArchiveAccessor", |
| from: "parent", |
| as: "fuchsia.diagnostics.RealLegacyMetricsArchiveAccessor", |
| to: [ "#inspect_test_runner" ], |
| }, |
| { |
| storage: "data", |
| from: "self", |
| to: [ |
| "#gtest_runner", |
| "#rust_test_runner", |
| "#starnix_test_runner", |
| "#starnix_unit_test_runner", |
| "#system-tests", |
| "#tests", |
| ], |
| }, |
| { |
| storage: "tmp", |
| from: "parent", |
| to: "#debug_data", |
| rights: [ "rw*" ], |
| }, |
| { |
| directory: "root-ssl-certificates", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "r*" ], |
| }, |
| |
| // Test realms may offer subdirectories of config-data to test |
| // components. See: |
| // https://fuchsia.dev/fuchsia-src/development/components/data#product-specific_configuration_with_config_data |
| { |
| directory: "config-data", |
| from: "parent", |
| to: [ "#system-tests" ], |
| }, |
| { |
| storage: "tmp", |
| from: "self", |
| to: [ |
| "#system-tests", |
| "#tests", |
| ], |
| }, |
| { |
| storage: "cache", |
| from: "self", |
| to: [ |
| "#system-tests", |
| "#tests", |
| ], |
| }, |
| { |
| storage: "custom_artifacts", |
| from: "self", |
| to: "#tests", |
| }, |
| |
| // temporary solution for tests that depend on having admin rights on |
| // /tmp. Will be removed once these tests either remove this requirement |
| // or begin hosting their own memfs. |
| { |
| directory: "memfs", |
| from: "#test_tmpfs", |
| as: "deprecated-tmp", |
| to: [ |
| "#system-tests", |
| "#tests", |
| ], |
| }, |
| |
| // fuchsia-pkg://fuchsia.com/input_session_tests#meta/input_session_bin_test.cm |
| // needs access to /dev/class/input-report. |
| { |
| directory: "dev-input-report", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "r*" ], |
| }, |
| |
| // Some non-hermetic tests require access to the real display controller. |
| { |
| directory: "dev-display-controller", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "rw*" ], |
| }, |
| |
| // Some non-hermetic tests require access to the GPU and vulkan |
| { |
| directory: "dev-goldfish-address-space", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "rw*" ], |
| }, |
| { |
| directory: "dev-goldfish-control", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "rw*" ], |
| }, |
| { |
| directory: "dev-goldfish-pipe", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "rw*" ], |
| }, |
| { |
| directory: "dev-goldfish-sync", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "rw*" ], |
| }, |
| { |
| directory: "dev-gpu", |
| from: "parent", |
| to: [ |
| "#starnix_test_runner", |
| "#system-tests", |
| ], |
| rights: [ "rw*" ], |
| }, |
| |
| // Tests of the media system want to test against the real hardware |
| // TODO(fxbug.dev/83512): Remove when specialized test realms are ready. |
| { |
| directory: "dev-mediacodec", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "rw*" ], |
| }, |
| |
| // Tests of the media system change their behavior based on board |
| // TODO(fxbug.dev/83512): Remove when specialized test realms are ready. |
| { |
| protocol: "fuchsia.sysinfo.SysInfo", |
| from: "parent", |
| to: [ "#system-tests" ], |
| }, |
| ], |
| expose: [ |
| { |
| protocol: "fuchsia.test.manager.Query", |
| from: "self", |
| }, |
| { |
| protocol: "fuchsia.test.internal.Info", |
| from: "self", |
| }, |
| { |
| protocol: "fuchsia.test.manager.RunBuilder", |
| from: "self", |
| }, |
| { |
| directory: "hub", |
| from: "framework", |
| }, |
| ], |
| } |