blob: d1bf81588c881906d84180a06d2203b5fb2c8d42 [file] [log] [blame]
{
include: [ "sdk/lib/diagnostics/syslog/client.shard.cml" ],
program: {
binary: "bin/test_manager",
},
children: [
{
name: "elf_test_runner",
url: "fuchsia-pkg://fuchsia.com/elf-test-runner#meta/elf-test-runner.cm",
},
{
name: "gtest_runner",
url: "fuchsia-pkg://fuchsia.com/gtest-runner#meta/gtest-runner.cm",
},
{
name: "rust_test_runner",
url: "fuchsia-pkg://fuchsia.com/rust-test-runner#meta/rust-test-runner.cm",
},
{
name: "go_test_runner",
url: "fuchsia-pkg://fuchsia.com/go-test-runner#meta/go-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",
},
],
collections: [
{
name: "tests",
environment: "#test-env",
durability: "transient",
},
],
capabilities: [
{
storage: "data",
from: "#runner_memfs",
backing_dir: "memfs",
},
{
storage: "temp",
from: "#test_tmpfs",
backing_dir: "memfs",
},
{ protocol: "fuchsia.test.manager.Harness" },
],
use: [
{ runner: "elf" },
{
protocol: "fuchsia.sys2.Realm",
from: "framework",
},
],
offer: [
{
protocol: [
"fuchsia.boot.WriteOnlyLog",
"fuchsia.logger.LogSink",
"fuchsia.process.Launcher",
"fuchsia.sys2.BlockingEventSource",
"fuchsia.sys2.EventSource",
],
from: "parent",
to: [ "#tests" ],
},
// These capabilities are offered for use by certain non-hermetic tests.
{
protocol: [
"fuchsia.hardware.display.Provider",
"fuchsia.scheduler.ProfileProvider",
"fuchsia.sysmem.Allocator",
"fuchsia.tracing.provider.Registry",
],
from: "parent",
to: [ "#tests" ],
},
{
protocol: "fuchsia.logger.LogSink",
from: "parent",
to: [
"#elf_test_runner",
"#go_test_runner",
"#gtest_runner",
"#runner_memfs",
"#rust_test_runner",
"#test_tmpfs",
],
},
{
protocol: "fuchsia.process.Launcher",
from: "parent",
to: [
"#elf_test_runner",
"#go_test_runner",
"#gtest_runner",
"#rust_test_runner",
],
},
{
storage: "data",
from: "self",
to: [
"#gtest_runner",
"#rust_test_runner",
],
},
{
directory: "config-ssl",
from: "parent",
to: [ "#tests" ],
rights: [ "r*" ],
},
// Some components run under test need access to /config/data.
{
directory: "config-data",
from: "parent",
to: [ "#tests" ],
},
{
storage: "temp",
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: [ "#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: [ "#tests" ],
rights: [ "r*" ],
},
// Some non-hermetic tests require access to the real display controller.
{
directory: "dev-display-controller",
from: "parent",
to: [ "#tests" ],
rights: [ "rw*" ],
},
],
expose: [
{
protocol: "fuchsia.test.manager.Harness",
from: "self",
},
],
environments: [
{
name: "test-env",
extends: "realm",
runners: [
{
runner: "elf_test_runner",
from: "#elf_test_runner",
},
{
runner: "gtest_runner",
from: "#gtest_runner",
},
{
runner: "rust_test_runner",
from: "#rust_test_runner",
},
{
runner: "go_test_runner",
from: "#go_test_runner",
},
],
},
],
}