| # Copyright 2022 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/rust/rustc_library.gni") |
| import("//build/rust/rustc_test.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":reloaddriver_test" ] |
| } |
| |
| group("drivers") { |
| testonly = true |
| deps = [ |
| "composite:component", |
| "leaf:component", |
| "left-parent:component", |
| "right-parent:component", |
| "root:component", |
| "target-1:component", |
| "target-2:component", |
| ] |
| } |
| |
| source_set("driver_helpers") { |
| testonly = true |
| sources = [ |
| "driver_helpers.cc", |
| "driver_helpers.h", |
| ] |
| public_deps = [ |
| "bindlib:fuchsia.reloaddriverbind.test_cpp", |
| "fidl:fuchsia.reloaddriver.test_cpp", |
| "//sdk/lib/driver/component/cpp", |
| ] |
| } |
| |
| rustc_library("reloadtest_tools") { |
| edition = "2024" |
| testonly = true |
| source_root = "reloadtest_tools.rs" |
| sources = [ "reloadtest_tools.rs" ] |
| deps = [ |
| "//sdk/fidl/fuchsia.driver.development:fuchsia.driver.development_rust", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| } |
| |
| rustc_test("bin") { |
| edition = "2024" |
| testonly = true |
| output_name = "reloaddriver_bin" |
| source_root = "test.rs" |
| sources = [ "test.rs" ] |
| deps = [ |
| ":reloadtest_tools", |
| "fidl:fuchsia.reloaddriver.test_rust", |
| "//sdk/fidl/fuchsia.driver.development:fuchsia.driver.development_rust", |
| "//sdk/fidl/fuchsia.driver.test:fuchsia.driver.test_rust", |
| "//sdk/lib/driver_test_realm/realm_builder/rust", |
| "//sdk/rust/zx", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-component-test", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| ] |
| } |
| |
| fuchsia_unittest_package("reloaddriver_test") { |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ |
| ":bin", |
| "composite:component", |
| "leaf:component", |
| "left-parent:component", |
| "right-parent:component", |
| "root:component", |
| "target-1:component", |
| "target-2:component", |
| "//sdk/lib/driver_test_realm:driver_test_realm_component", |
| ] |
| } |