| // Copyright 2022 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. |
| { |
| include: [ |
| "//sdk/ctf/test_realm/meta/test-collection.shard.cml", |
| "//src/devices/testing/devices_test_realm.shard.cml", |
| "//src/lib/vulkan/vulkan_test_realm.shard.cml", |
| "//src/media/testing/drm_test_realm.shard.cml", |
| "//src/media/testing/media_test_realm.shard.cml", |
| "//src/sys/component_manager/tests/capability_provider_vfs_compliance/vfs_compliance_test_realm.shard.cml", |
| "//src/sys/test_manager/meta/chromium_test_realm.shard.cml", |
| "//src/sys/test_manager/meta/google_test_realm.shard.cml", |
| "//src/testing/system-validation/meta/system_validation_test_realm.shard.cml", |
| "inspect/client.shard.cml", |
| "sys/component/realm_builder.shard.cml", |
| "syslog/client.shard.cml", |
| ], |
| program: { |
| runner: "elf", |
| binary: "bin/test_manager", |
| }, |
| children: [ |
| { |
| name: "dart_aot_runner", |
| url: "fuchsia-pkg://fuchsia.com/dart-aot-wrapper-runner#meta/dart-aot-wrapper-runner.cm", |
| }, |
| { |
| name: "dart_jit_runner", |
| url: "fuchsia-pkg://fuchsia.com/dart-jit-wrapper-runner#meta/dart-jit-wrapper-runner.cm", |
| }, |
| { |
| 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: "fuzz_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/fuzz-test-runner#meta/fuzz-test-runner.cm", |
| }, |
| { |
| name: "g3_dart_jit_product_runner", |
| url: "fuchsia-pkg://fuchsia.com/g3_dart_jit_product_runner#meta/g3_dart_jit_product_runner.cm", |
| }, |
| { |
| name: "gtest_runner", |
| url: "fuchsia-pkg://fuchsia.com/gtest-runner#meta/gtest-runner.cm", |
| }, |
| { |
| name: "gunit_runner", |
| url: "fuchsia-pkg://fuchsia.com/gunit-runner#meta/gunit-runner.cm", |
| }, |
| { |
| name: "legacy_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/legacy-test-runner#meta/legacy-test-runner.cm", |
| }, |
| { |
| name: "lib_loader_cache", |
| url: "fuchsia-pkg://fuchsia.com/lib_loader_runner_cache#meta/lib_loader_runner_cache.cm", |
| }, |
| { |
| name: "netemul_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/netemul-test-runner#meta/netemul-test-runner.cm", |
| }, |
| { |
| name: "rust_test_next_vdso_runner", |
| url: "fuchsia-pkg://fuchsia.com/rust-test-next-vdso-runner#meta/rust-test-next-vdso-runner.cm", |
| }, |
| { |
| name: "rust_test_runner", |
| url: "fuchsia-pkg://fuchsia.com/rust-test-runner#meta/rust-test-runner.cm", |
| }, |
| { |
| name: "starnix_test_runners", |
| url: "fuchsia-pkg://fuchsia.com/starnix-test-runners#meta/starnix_test_runners.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", |
| }, |
| { |
| 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_rust.cm", |
| }, |
| { |
| name: "early_boot_instrumentation", |
| url: "#meta/early-boot-instrumentation.cm", |
| }, |
| ], |
| collections: [ |
| { |
| name: "tests", |
| environment: "#test-env", |
| durability: "transient", |
| }, |
| { |
| name: "system-tests", |
| environment: "#legacy-test-env", |
| durability: "transient", |
| }, |
| { |
| name: "starnix-tests", |
| environment: "#test-env", |
| durability: "transient", |
| }, |
| { |
| name: "zxdump-tests", |
| environment: "#test-env", |
| durability: "transient", |
| }, |
| ], |
| capabilities: [ |
| { |
| storage: "memfs_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", |
| }, |
| { |
| directory: "fxfs_data", |
| rights: [ "rw*" ], |
| path: "/data_for_test", |
| }, |
| { |
| storage: "data", |
| from: "self", |
| backing_dir: "fxfs_data", |
| storage_id: "static_instance_id_or_moniker", |
| }, |
| { protocol: "fuchsia.test.manager.Query" }, |
| { protocol: "fuchsia.test.manager.RunBuilder" }, |
| ], |
| use: [ |
| { |
| protocol: "fuchsia.component.Realm", |
| from: "framework", |
| }, |
| { |
| protocol: [ |
| "fuchsia.element.GraphicalPresenter", |
| "fuchsia.sys.Environment", |
| "fuchsia.sys.Loader", |
| ], |
| availability: "optional", |
| }, |
| |
| // TODO(fxbug.dev/86464): Clean this up |
| { protocol: "fuchsia.component.resolution.Resolver" }, |
| { |
| protocol: "fuchsia.sys2.StorageAdmin", |
| from: "#custom_artifacts", |
| }, |
| { |
| directory: "debugdata", |
| from: "#early_boot_instrumentation", |
| rights: [ "r*" ], |
| path: "/debugdata", |
| }, |
| { |
| protocol: "fuchsia.test.internal.DebugDataController", |
| from: "#debug_data", |
| }, |
| { |
| storage: "tmp", |
| rights: [ "rw*" ], |
| path: "/tmp", |
| }, |
| { |
| storage: "data", |
| rights: [ "rw*" ], |
| path: "/data", |
| }, |
| ], |
| offer: [ |
| { |
| protocol: [ |
| // Tests can write to debug logs |
| "fuchsia.boot.WriteOnlyLog", |
| "fuchsia.process.Launcher", |
| |
| // Tests can produce trace. |
| "fuchsia.tracing.provider.Registry", |
| ], |
| from: "parent", |
| to: [ |
| "#starnix-tests", |
| "#system-tests", |
| "#tests", |
| ], |
| }, |
| { |
| event_stream: [ |
| "capability_requested_v2", |
| "directory_ready_v2", |
| ], |
| from: "parent", |
| to: "#starnix-tests", |
| scope: "#starnix-tests", |
| }, |
| { |
| event_stream: [ |
| "capability_requested_v2", |
| "debug_started_v2", |
| "destroyed_v2", |
| "directory_ready_v2", |
| "discovered_v2", |
| "started_v2", |
| "stopped_v2", |
| ], |
| from: "parent", |
| to: "#system-tests", |
| scope: "#system-tests", |
| }, |
| { |
| event_stream: [ |
| "capability_requested_v2", |
| "debug_started_v2", |
| "destroyed_v2", |
| "directory_ready_v2", |
| "discovered_v2", |
| "started_v2", |
| "stopped_v2", |
| ], |
| from: "parent", |
| to: "#tests", |
| scope: "#tests", |
| }, |
| { |
| protocol: [ |
| "fuchsia.device.NameProvider", |
| "fuchsia.feedback.CrashReporter", |
| "fuchsia.intl.PropertyProvider", |
| "fuchsia.net.name.Lookup", |
| "fuchsia.posix.socket.Provider", |
| "fuchsia.tracing.provider.Registry", |
| ], |
| from: "parent", |
| to: [ |
| "#dart_aot_runner", |
| "#dart_jit_runner", |
| "#g3_dart_jit_product_runner", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.sys.Environment", |
| "fuchsia.sys.Loader", |
| ], |
| from: "parent", |
| to: [ |
| "#dart_aot_runner", |
| "#dart_jit_runner", |
| "#g3_dart_jit_product_runner", |
| ], |
| availability: "optional", |
| }, |
| { |
| protocol: [ "fuchsia.sys2.EventSource" ], |
| from: "parent", |
| 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", |
| |
| // Needed for test_manager_tests and test runner tests. |
| // TODO(fxbug.dev/86464): Remove this once we have facet API. |
| "fuchsia.component.resolution.Resolver", |
| "fuchsia.exception.Handler", |
| |
| // fuchsia.hardware.pty.Device is needed for terminal_tests. |
| // TODO(fxbug.dev/97992): Remove this once the test is hermetic. |
| "fuchsia.hardware.pty.Device", |
| "fuchsia.kernel.Counter", |
| "fuchsia.kernel.CpuResource", |
| "fuchsia.kernel.DebugResource", |
| "fuchsia.kernel.HypervisorResource", |
| "fuchsia.kernel.InfoResource", |
| "fuchsia.kernel.IoportResource", |
| "fuchsia.kernel.IrqResource", |
| "fuchsia.kernel.MexecResource", |
| "fuchsia.kernel.MmioResource", |
| "fuchsia.kernel.PowerResource", |
| "fuchsia.kernel.RootJob", |
| "fuchsia.kernel.RootJobForInspect", |
| "fuchsia.kernel.SmcResource", |
| "fuchsia.kernel.Stats", |
| "fuchsia.kernel.VmexResource", |
| "fuchsia.media.ProfileProvider", |
| |
| // Needed for Bluetooth streaming E2E tests. |
| // TODO(fxbug.dev/90434): Consider removing when mediaplayer is v2. |
| "fuchsia.media.SessionAudioConsumerFactory", |
| |
| // 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", |
| |
| // Dart runners allow connections from the Dart Observatory, |
| // for debugging. |
| "fuchsia.posix.socket.Provider", |
| "fuchsia.scheduler.ProfileProvider", |
| "fuchsia.sysmem.Allocator", |
| "fuchsia.vulkan.loader.Loader", |
| ], |
| from: "parent", |
| to: "#system-tests", |
| }, |
| { |
| protocol: [ |
| "fuchsia.sys.Environment", |
| "fuchsia.sys.Loader", |
| ], |
| from: "parent", |
| to: [ |
| "#legacy_test_runner", |
| |
| // TODO(https://fxbug.dev/87164): when these legacy capabilities used by the |
| // realm builder server can be optional, don't offer them to the |
| // netemul_test_runner. |
| "#netemul_test_runner", |
| ], |
| availability: "optional", |
| }, |
| { |
| protocol: [ "fuchsia.tracing.provider.Registry" ], |
| from: "parent", |
| to: [ "#starnix_test_runners" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.kernel.VmexResource", |
| "fuchsia.posix.socket.Provider", |
| "fuchsia.posix.socket.raw.Provider", |
| "fuchsia.sysmem.Allocator", |
| "fuchsia.ui.composition.Allocator", |
| "fuchsia.ui.composition.Flatland", |
| "fuchsia.ui.input3.Keyboard", |
| "fuchsia.ui.scenic.Scenic", |
| "fuchsia.vulkan.loader.Loader", |
| ], |
| from: "parent", |
| to: [ |
| "#starnix-tests", |
| "#starnix_test_runners", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.RootResource", |
| "fuchsia.process.Launcher", |
| ], |
| from: "parent", |
| to: "#zxdump-tests", |
| }, |
| { |
| protocol: "fuchsia.process.Launcher", |
| from: "parent", |
| to: [ |
| "#elf_test_ambient_exec_runner", |
| "#elf_test_runner", |
| "#fuzz_test_runner", |
| "#go_test_runner", |
| "#gtest_runner", |
| "#gunit_runner", |
| "#netemul_test_runner", |
| "#rust_test_next_vdso_runner", |
| "#rust_test_runner", |
| "#starnix_test_runners", |
| ], |
| }, |
| { |
| protocol: "fuchsia.test.runner.LibraryLoaderCacheBuilder", |
| from: "#lib_loader_cache", |
| to: [ |
| "#elf_test_ambient_exec_runner", |
| "#elf_test_runner", |
| "#fuzz_test_runner", |
| "#go_test_runner", |
| "#gtest_runner", |
| "#gunit_runner", |
| "#rust_test_next_vdso_runner", |
| "#rust_test_runner", |
| "#starnix_test_runners", |
| ], |
| }, |
| { |
| protocol: "fuchsia.fuzzer.Registrar", |
| from: "parent", |
| to: "#fuzz_test_runner", |
| }, |
| { |
| event_stream: [ |
| "capability_requested_v2", |
| "destroyed_v2", |
| "directory_ready_v2", |
| "started_v2", |
| "stopped_v2", |
| ], |
| from: "parent", |
| to: "#debug_data", |
| }, |
| { |
| 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: "memfs_data", |
| from: "self", |
| as: "data", |
| to: [ |
| "#gtest_runner", |
| "#gunit_runner", |
| "#rust_test_next_vdso_runner", |
| "#rust_test_runner", |
| "#starnix-tests", |
| "#starnix_test_runners", |
| ], |
| }, |
| { |
| storage: "data", |
| from: "self", |
| to: [ |
| "#system-tests", |
| "#tests", |
| ], |
| rights: [ "rw*" ], |
| }, |
| { |
| storage: "tmp", |
| from: "parent", |
| to: "#debug_data", |
| rights: [ "rw*" ], |
| }, |
| { |
| directory: "root-ssl-certificates", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "r*" ], |
| }, |
| |
| // audio_core_hardware_tests records from the real microphone, so it needs system audio. |
| // bt-a2dp-loopback-test needs system audio. |
| { |
| protocol: [ |
| "fuchsia.media.Audio", |
| "fuchsia.media.AudioDeviceEnumerator", |
| ], |
| from: "parent", |
| to: [ "#system-tests" ], |
| }, |
| { |
| protocol: [ "fuchsia.factory.WeaveFactoryStoreProvider" ], |
| from: "parent", |
| to: [ "#system-tests" ], |
| }, |
| |
| // 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: [ |
| // TODO(99511) Remove dependence on config-data once it is removed from the dart_*_runner cml. |
| "#dart_aot_runner", |
| "#dart_jit_runner", |
| "#g3_dart_jit_product_runner", |
| "#system-tests", |
| ], |
| }, |
| { |
| storage: "tmp", |
| from: "self", |
| to: [ |
| "#starnix-tests", |
| "#system-tests", |
| "#tests", |
| ], |
| }, |
| { |
| storage: "cache", |
| from: "self", |
| to: [ |
| "#debug_data", |
| "#starnix-tests", |
| "#system-tests", |
| "#tests", |
| ], |
| }, |
| { |
| storage: "custom_artifacts", |
| from: "self", |
| to: [ |
| "#starnix-tests", |
| "#system-tests", |
| "#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", |
| ], |
| }, |
| |
| // Some non-hermetic tests require access to real input. |
| { |
| directory: "dev-input", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "r*" ], |
| }, |
| { |
| 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-tests", |
| "#starnix_test_runners", |
| "#system-tests", |
| ], |
| rights: [ "rw*" ], |
| }, |
| { |
| directory: "dev-gpu-performance-counters", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "rw*" ], |
| }, |
| |
| // audio_driver_tests requires access to audio input and output. |
| { |
| directory: [ |
| "dev-audio-input", |
| "dev-audio-output", |
| ], |
| from: "parent", |
| to: [ "#system-tests" ], |
| }, |
| |
| // optee_test requires access to /dev/class/tee. |
| { |
| directory: "dev-tee", |
| from: "parent", |
| to: [ "#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*" ], |
| }, |
| { |
| directory: "dev-sysmem", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "rw*" ], |
| }, |
| { |
| directory: "dev-securemem", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "rw*" ], |
| }, |
| { |
| directory: "boot", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "rx*" ], |
| }, |
| { |
| directory: "boot", |
| from: "parent", |
| to: [ "#early_boot_instrumentation" ], |
| rights: [ "r*" ], |
| }, |
| { |
| protocol: "fuchsia.boot.SvcStashProvider", |
| from: "parent", |
| to: [ "#early_boot_instrumentation" ], |
| }, |
| |
| // 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" ], |
| }, |
| |
| // CPU Profiling tests require access to ktrace data to parse results |
| { |
| protocol: [ |
| "fuchsia.tracing.kernel.Controller", |
| "fuchsia.tracing.kernel.Reader", |
| ], |
| from: "parent", |
| to: [ "#system-tests" ], |
| }, |
| |
| // CPU Profiling tests require access to the /dev/sys/cpu-trace device |
| { |
| directory: "sys", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "r*" ], |
| }, |
| |
| // flutter_*_runner |
| { |
| protocol: [ |
| "fuchsia.fonts.Provider", |
| "fuchsia.intl.PropertyProvider", |
| "fuchsia.memorypressure.Provider", |
| "fuchsia.ui.composition.Flatland", |
| "fuchsia.ui.scenic.Scenic", |
| ], |
| from: "parent", |
| to: [ "#system-tests" ], |
| }, |
| |
| // `tz_version_parrot` tests use the system tzdata. |
| { |
| directory: "tzdata-icu-44-le", |
| from: "parent", |
| to: [ "#system-tests" ], |
| rights: [ "r*" ], |
| }, |
| ], |
| expose: [ |
| { |
| protocol: "fuchsia.test.manager.Query", |
| from: "self", |
| }, |
| { |
| protocol: "fuchsia.test.manager.RunBuilder", |
| from: "self", |
| }, |
| ], |
| } |