| // 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: [ |
| { |
| // These hermetic capabilities are offered to be used by tests. |
| protocol: [ |
| // Tests can write to debug logs |
| "fuchsia.boot.WriteOnlyLog", |
| "fuchsia.inspect.InspectSink", |
| "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... |
| directory: [ |
| "dev-audio-input", |
| "dev-audio-output", |
| "dev-codec", |
| "dev-composite", |
| "dev-dai", |
| ], |
| from: "parent", |
| to: [ "#devices-tests" ], |
| rights: [ "r*" ], |
| }, |
| { |
| // ... including the `virtual_audio` driver, at /dev/sys/platform/virtual-audio. |
| directory: "sys", |
| from: "parent", |
| to: [ "#devices-tests" ], |
| rights: [ "r*" ], |
| }, |
| ], |
| } |