| # Copyright 2021 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") |
| import("//build/rust/rustc_test.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":devfs_exporter_test", |
| ":devfs_exporter_test-rust", |
| ] |
| } |
| |
| fidl("fuchsia.devfs.test") { |
| testonly = true |
| sources = [ "devfs.test.fidl" ] |
| } |
| |
| driver_bind_rules("root_bind") { |
| disable_autobind = true |
| bind_output = "root.bindbc" |
| } |
| |
| fuchsia_cc_driver("root_driver") { |
| testonly = true |
| output_name = "devfs_exporter_root" |
| sources = [ "root_driver.cc" ] |
| deps = [ |
| ":fuchsia.devfs.test_cpp", |
| ":root_bind", |
| "//sdk/lib/driver/component/cpp", |
| "//sdk/lib/driver/devfs/cpp", |
| "//src/devices/lib/driver:driver_runtime", |
| ] |
| } |
| |
| fuchsia_driver_component("root") { |
| info = "meta/root-info.json" |
| testonly = true |
| manifest = "meta/root.cml" |
| deps = [ ":root_driver" ] |
| } |
| |
| rustc_test("bin") { |
| edition = "2024" |
| testonly = true |
| output_name = "devfs_exporter_bin" |
| source_root = "test.rs" |
| sources = [ "test.rs" ] |
| deps = [ |
| ":fuchsia.devfs.test_rust", |
| "//sdk/fidl/fuchsia.driver.test:fuchsia.driver.test_rust", |
| "//sdk/lib/device-watcher/rust", |
| "//sdk/lib/driver_test_realm/realm_builder/rust:rust_no_driver_manager", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component-test", |
| "//third_party/rust_crates:anyhow", |
| ] |
| } |
| |
| fuchsia_unittest_package("devfs_exporter_test") { |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ |
| ":bin", |
| ":root", |
| "//sdk/lib/driver_test_realm:driver_manager_test", |
| ] |
| } |
| |
| fuchsia_unittest_package("devfs_exporter_test-rust") { |
| package_name = "devfs_exporter_test-rustdm" |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ |
| ":bin", |
| ":root", |
| "//sdk/lib/driver_test_realm:driver_manager_test_rust", |
| ] |
| } |