| // 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. |
| { |
| include: [ |
| "inspect/client.shard.cml", |
| "syslog/client.shard.cml", |
| ], |
| children: [ |
| { |
| name: "driver_manager", |
| url: "#meta/driver_manager_test.cm", |
| startup: "eager", |
| environment: "#driver_manager-env", |
| }, |
| { |
| name: "fake-resolver", |
| url: "#meta/fake_resolver.cm", |
| }, |
| { |
| name: "driver-index", |
| url: "#meta/driver-index.cm", |
| }, |
| { |
| name: "devfs", |
| url: "#meta/devfs.cm", |
| }, |
| ], |
| collections: [ |
| { |
| name: "driver-hosts", |
| environment: "#driver-host-env", |
| durability: "single_run", |
| }, |
| { |
| name: "boot-drivers", |
| environment: "#driver-env", |
| durability: "transient", |
| allowed_offers: "static_and_dynamic", |
| allow_long_names: true, |
| }, |
| { |
| name: "base-drivers", |
| environment: "#driver-env", |
| durability: "transient", |
| allowed_offers: "static_and_dynamic", |
| allow_long_names: true, |
| }, |
| { |
| name: "full-drivers", |
| environment: "#driver-env", |
| durability: "transient", |
| allowed_offers: "static_and_dynamic", |
| allow_long_names: true, |
| }, |
| ], |
| capabilities: [ |
| { |
| config: "fuchsia.driver.EnableEphemeralDrivers", |
| type: "bool", |
| value: true, |
| }, |
| { |
| config: "fuchsia.driver.DelayFallbackUntilBaseDriversIndexed", |
| type: "bool", |
| value: true, |
| }, |
| { |
| config: "fuchsia.driver.EnableDriverLoadFuzzer", |
| type: "bool", |
| value: false, |
| }, |
| { |
| config: "fuchsia.driver.DriverLoadFuzzerMaxDelayMs", |
| type: "int64", |
| value: 0, |
| }, |
| ], |
| offer: [ |
| { |
| protocol: "fuchsia.tracing.provider.Registry", |
| from: "void", |
| to: "all", |
| availability: "optional", |
| }, |
| |
| // TODO(b/345827642): Remove once all old CTF prebuilts |
| // have been pruned. This is needed for compatibility |
| // with older driver CTF tests. |
| { |
| protocol: [ |
| "fuchsia.inspect.InspectSink", |
| "fuchsia.logger.LogSink", |
| ], |
| from: "parent/diagnostics", |
| to: [ |
| "#base-drivers", |
| "#boot-drivers", |
| "#devfs", |
| "#driver-hosts", |
| "#driver-index", |
| "#driver_manager", |
| "#fake-resolver", |
| "#full-drivers", |
| ], |
| }, |
| { |
| config: [ |
| "fuchsia.driver.DelayFallbackUntilBaseDriversIndexed", |
| "fuchsia.driver.DriverLoadFuzzerMaxDelayMs", |
| "fuchsia.driver.EnableDriverLoadFuzzer", |
| "fuchsia.driver.EnableEphemeralDrivers", |
| ], |
| from: "self", |
| to: "#driver-index", |
| }, |
| { |
| config: [ |
| "fuchsia.driver.DelayFallbackUntilBaseDriversIndexed", |
| "fuchsia.driver.manager.EnableTestShutdownDelays", |
| "fuchsia.power.SuspendEnabled", |
| ], |
| from: "void", |
| to: "#driver_manager", |
| availability: "optional", |
| }, |
| { |
| protocol: [ "fuchsia.device.fs.lifecycle.Lifecycle" ], |
| from: "#driver_manager", |
| to: [ "#devfs" ], |
| }, |
| { |
| directory: "dev", |
| from: "#driver_manager", |
| to: "#devfs", |
| }, |
| { |
| protocol: "fuchsia.component.Realm", |
| from: "framework", |
| to: "#driver_manager", |
| }, |
| { |
| protocol: "fuchsia.component.Introspector", |
| from: "framework", |
| to: "#driver_manager", |
| }, |
| { |
| config: [ |
| "fuchsia.power.SuspendEnabled", |
| "fuchsia.usb.PeripheralConfig.Functions", |
| ], |
| from: "void", |
| to: "#boot-drivers", |
| availability: "optional", |
| }, |
| { |
| protocol: [ "fuchsia.driver.framework.CompositeNodeManager" ], |
| from: "#driver_manager", |
| to: [ |
| "#base-drivers", |
| "#boot-drivers", |
| "#full-drivers", |
| ], |
| }, |
| { |
| protocol: [ "fuchsia.boot.WriteOnlyLog" ], |
| from: "void", |
| to: [ |
| "#driver-hosts", |
| "#driver_manager", |
| ], |
| availability: "optional", |
| }, |
| { |
| protocol: [ "fuchsia.scheduler.RoleManager" ], |
| from: "void", |
| to: [ |
| "#boot-drivers", |
| "#driver-hosts", |
| "#driver_manager", |
| ], |
| availability: "optional", |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Items", |
| "fuchsia.kernel.RootJob", |
| ], |
| from: "parent", |
| to: [ "#boot-drivers" ], |
| }, |
| { |
| protocol: [ "fuchsia.boot.Arguments" ], |
| from: "void", |
| to: [ "#boot-drivers" ], |
| availability: "optional", |
| }, |
| { |
| protocol: [ |
| "fuchsia.boot.Items", |
| "fuchsia.kernel.RootJob", |
| "fuchsia.system.state.SystemStateTransition", |
| ], |
| from: "parent", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| protocol: [ "fuchsia.kernel.MexecResource" ], |
| from: "void", |
| to: [ "#driver_manager" ], |
| availability: "optional", |
| }, |
| { |
| protocol: [ "fuchsia.system.state.SystemStateTransition" ], |
| from: "parent", |
| to: [ |
| "#base-drivers", |
| "#boot-drivers", |
| "#driver-hosts", |
| "#full-drivers", |
| ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.component.resolution.Resolver-hermetic", |
| "fuchsia.driver.test.Internal", |
| "fuchsia.pkg.PackageResolver-hermetic", |
| ], |
| from: "parent", |
| to: [ "#fake-resolver" ], |
| }, |
| { |
| protocol: "fuchsia.driver.test.DriverLists", |
| from: "#fake-resolver", |
| to: "#driver-index", |
| availability: "optional", |
| }, |
| { |
| protocol: [ |
| "fuchsia.driver.index.DevelopmentManager", |
| "fuchsia.driver.index.DriverIndex", |
| "fuchsia.driver.registrar.DriverRegistrar", |
| ], |
| from: "#driver-index", |
| to: [ "#driver_manager" ], |
| }, |
| { |
| protocol: [ |
| "fuchsia.component.resolution.Resolver-base", |
| "fuchsia.component.resolution.Resolver-boot", |
| "fuchsia.component.resolution.Resolver-full", |
| ], |
| from: "#fake-resolver", |
| to: [ |
| "#driver-index", |
| "#driver_manager", |
| ], |
| }, |
| ], |
| expose: [ |
| { |
| directory: [ |
| "dev-class", |
| "dev-topological", |
| ], |
| from: "#devfs", |
| }, |
| { |
| protocol: [ |
| "fuchsia.driver.development.Manager", |
| "fuchsia.driver.framework.CompositeNodeManager", |
| "fuchsia.system.state.Administrator", |
| ], |
| from: "#driver_manager", |
| }, |
| { |
| protocol: "fuchsia.driver.registrar.DriverRegistrar", |
| from: "#driver-index", |
| }, |
| { |
| runner: "driver", |
| from: "#driver_manager", |
| }, |
| ], |
| environments: [ |
| { |
| name: "driver_manager-env", |
| extends: "realm", |
| |
| // 1 minute |
| __stop_timeout_ms: 60000, |
| }, |
| { |
| name: "driver-host-env", |
| extends: "realm", |
| resolvers: [ |
| { |
| resolver: "boot-resolver", |
| from: "#fake-resolver", |
| scheme: "fuchsia-boot", |
| }, |
| ], |
| |
| // 20 seconds |
| __stop_timeout_ms: 20000, |
| }, |
| { |
| name: "driver-env", |
| extends: "realm", |
| runners: [ |
| { |
| runner: "driver", |
| from: "#driver_manager", |
| }, |
| ], |
| resolvers: [ |
| { |
| resolver: "boot-resolver", |
| from: "#fake-resolver", |
| scheme: "fuchsia-boot", |
| }, |
| { |
| resolver: "pkg-resolver", |
| from: "#fake-resolver", |
| scheme: "fuchsia-pkg", |
| }, |
| { |
| resolver: "test-pkg-resolver", |
| from: "#fake-resolver", |
| scheme: "dtr-test-pkg", |
| }, |
| ], |
| |
| // 10 seconds |
| __stop_timeout_ms: 10000, |
| }, |
| ], |
| } |