blob: 2d98f4047b5eb06d475ae7e9d1fc640bab2bb086 [file] [log] [blame]
// 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: [
// Tests can produce trace.
"trace/client.shard.cml",
],
collections: [
{
name: "devices-tests",
environment: "#test-env",
durability: "transient",
},
],
offer: [
{
dictionary: "diagnostics",
from: "parent",
to: [ "#devices-tests" ],
},
{
// These hermetic capabilities are offered to be used by tests.
protocol: [
// Tests can write to debug logs
"fuchsia.boot.WriteOnlyLog",
"fuchsia.process.Launcher",
"fuchsia.vulkan.loader.Loader",
],
from: "parent",
to: [ "#devices-tests" ],
},
{
// Used by the device enumeration tests.
protocol: [
"fuchsia.driver.development.Manager",
"fuchsia.sysinfo.SysInfo",
],
from: "parent",
to: [ "#devices-tests" ],
},
{
// Used to ephemerally add drivers for tests.
protocol: [ "fuchsia.driver.registrar.DriverRegistrar" ],
from: "parent",
to: [ "#devices-tests" ],
},
{
event_stream: [ "capability_requested" ],
from: "parent",
to: "#devices-tests",
scope: "#devices-tests",
},
{
storage: [
"cache",
"tmp",
],
from: "self",
to: [ "#devices-tests" ],
},
{
storage: "fxfs_tests_data",
from: "self",
as: "data",
to: [ "#devices-tests" ],
rights: [ "rw*" ],
},
{
directory: [
"dev-class",
"dev-topological",
],
from: "parent",
to: "#devices-tests",
},
{
// The `audio_driver_tests` suite requires access to various audio driver types...
// TODO(https://fxbug.dev/324273348): Remove this capability once the clients have been migrated to services. The service capability has been added below.
directory: [
"dev-audio-composite",
"dev-audio-input",
"dev-audio-output",
"dev-codec",
"dev-dai",
],
from: "parent",
to: [ "#devices-tests" ],
rights: [ "r*" ],
},
{
// These services replace the directory capabilities above.
service: [
"fuchsia.gpu.magma.PerformanceCounterService",
"fuchsia.gpu.magma.Service",
"fuchsia.gpu.magma.TestService",
"fuchsia.gpu.magma.TrustedService",
"fuchsia.hardware.audio.CodecConnectorService",
"fuchsia.hardware.audio.CompositeConnectorService",
"fuchsia.hardware.audio.DaiConnectorService",
"fuchsia.hardware.audio.StreamConfigConnectorInputService",
"fuchsia.hardware.audio.StreamConfigConnectorOutputService",
"fuchsia.hardware.gpu.mali.UtilsService",
"fuchsia.hardware.rpmb.Service",
],
from: "parent",
to: [ "#devices-tests" ],
},
{
// ... including the `virtual-audio-legacy` driver, at
// /dev/sys/platform/virtual-audio-legacy.
directory: "sys",
from: "parent",
to: [ "#devices-tests" ],
rights: [ "r*" ],
},
],
}