| // Copyright 2023 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. |
| { |
| collections: [ |
| { |
| name: "starnix-tests", |
| environment: "#test-env", |
| durability: "transient", |
| }, |
| ], |
| offer: [ |
| { |
| // Tests are permitted to use /dev/null and /dev/zero. |
| directory: "dev-builtin", |
| from: "parent", |
| to: [ "#starnix-tests" ], |
| }, |
| { |
| 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" ], |
| }, |
| { |
| event_stream: [ |
| "capability_requested", |
| "debug_started", |
| "destroyed", |
| "started", |
| "stopped", |
| ], |
| from: "parent", |
| to: "#starnix-tests", |
| scope: "#starnix-tests", |
| }, |
| { |
| protocol: "fuchsia.fshost.StarnixVolumeProvider", |
| from: "parent", |
| to: "#starnix-tests", |
| availability: "optional", |
| }, |
| { |
| protocol: [ |
| "fuchsia.audio.device.ControlCreator", |
| "fuchsia.audio.device.Provider", |
| "fuchsia.audio.device.Registry", |
| "fuchsia.buildinfo.Provider", |
| "fuchsia.feedback.CrashReporter", |
| "fuchsia.kernel.CpuResource", |
| "fuchsia.kernel.RootJob", |
| "fuchsia.kernel.SamplingResource", |
| "fuchsia.kernel.Stats", |
| "fuchsia.kernel.VmexResource", |
| "fuchsia.sysinfo.SysInfo", |
| "fuchsia.sysmem.Allocator", |
| "fuchsia.sysmem2.Allocator", |
| "fuchsia.tracing.controller.Provisioner", |
| "fuchsia.tracing.controller.Session", |
| "fuchsia.vulkan.loader.Loader", |
| ], |
| from: "parent", |
| to: "#starnix-tests", |
| }, |
| { |
| // 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-gpu", |
| from: "parent", |
| to: [ "#starnix-tests" ], |
| rights: [ "r*" ], |
| }, |
| { |
| // This service replaces the directory capability above. |
| service: "fuchsia.gpu.magma.Service", |
| from: "parent", |
| to: [ "#starnix-tests" ], |
| }, |
| { |
| directory: "boot", |
| from: "parent", |
| as: "boot-kernel", |
| to: [ "#starnix-tests" ], |
| subdir: "kernel", |
| }, |
| { |
| // TODO(https://fxbug.dev/304290346): In an ideal world, we would |
| // mock bluetooth hardware in tests. |
| // 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-class", |
| from: "parent", |
| as: "dev-bt-hci", |
| to: [ "#starnix-tests" ], |
| subdir: "bt-hci", |
| }, |
| { |
| // This service replaces the directory capability above. |
| service: "fuchsia.hardware.bluetooth.Service", |
| from: "parent", |
| to: [ "#starnix-tests" ], |
| }, |
| { |
| service: "fuchsia.hardware.haptics.Service", |
| from: "parent", |
| to: [ "#starnix-tests" ], |
| }, |
| { |
| storage: "fxfs_tests_data", |
| from: "self", |
| as: "data", |
| to: [ "#starnix-tests" ], |
| rights: [ "rw*" ], |
| }, |
| { |
| storage: "cache", |
| from: "self", |
| to: [ "#starnix-tests" ], |
| }, |
| { |
| storage: "tmp", |
| from: "self", |
| to: [ "#starnix-tests" ], |
| }, |
| { |
| dictionary: "diagnostics", |
| from: "parent", |
| to: [ "#starnix-tests" ], |
| }, |
| ], |
| } |