| # Copyright 2024 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. |
| |
| import("//build/components.gni") |
| import("//build/drivers.gni") |
| |
| fuchsia_driver_package("pkg") { |
| package_name = "zircon_transport_rust_next" |
| driver_components = [ |
| "parent:component", |
| "child:component", |
| ] |
| } |
| |
| rustc_test("realm-test") { |
| edition = "2021" |
| output_name = "zircon-rust-next-driver-realm-test" |
| testonly = true |
| source_root = "realm_test.rs" |
| sources = [ "realm_test.rs" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.driver.development:fuchsia.driver.development_rust", |
| "//sdk/fidl/fuchsia.driver.framework:fuchsia.driver.framework_rust", |
| "//sdk/fidl/fuchsia.driver.test:fuchsia.driver.test_rust", |
| "//sdk/fidl/fuchsia.hardware.i2c:fuchsia.hardware.i2c_rust", |
| "//sdk/lib/driver_test_realm/realm_builder/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-component-test", |
| "//third_party/rust_crates:anyhow", |
| ] |
| } |
| |
| fuchsia_unittest_package("realm-test-pkg") { |
| package_name = "zircon-rust-next-driver-realm-test" |
| deps = [ |
| # Test component |
| ":realm-test", |
| |
| # Parent and child driver |
| "child:component", |
| "parent:component", |
| |
| # Test root |
| "//src/devices/misc/drivers/test-parent", |
| ] |
| |
| # There's expected error logs that happen due to races in driver enumeration. |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("hermetic-tests") { |
| testonly = true |
| deps = [ |
| ":realm-test-pkg", |
| "child:hermetic-test-pkg", |
| "parent:hermetic-test-pkg", |
| ] |
| } |