This directory contains testing utilities for working with a CFv2-compatible Isolated DevMgr component.
There are two main ways to use the CFv2 IsolatedDevMgr:
isolated_devmgr_v2_component
component locally, which exposes a /dev
directory. With this GN template, the client is responsible for routing the /dev
dir into their test component's namespace as necessary. This would generally be via CML, but could also be done at runtime in Rust via the fuchsia_component_test::RealmBuilder.isolated_devmgr_unittest_v2_component
component to be a child component of the test component, ensuring it is packaged alongside the test component. Then, one uses either the C++ OneTimeSetup or Rust launch_isolated_driver_manager
utility to bind the isolated driver manager‘s /dev
directory into the test component’s namespace dynamically.We'll examine the GN targets in this directory to get a better sense of how they fit together:
isolated_devmgr_v2_component
, takes only a package name. It defines an IsolatedDevMgr component that exposes a directory capability named dev
in that package. The second, isolated_devmgr_unittest_v2_component
, takes a test executable and package name as input and generates a unit test component with a child IsolatedDevMgr component. Tests that use this template generally use one of the following client libraries./dev
directory with the isolated devfs exposed by a child IsolatedDevMgr./dev
directory to the test component.