| # Copyright 2020 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") |
| |
| rustc_library("bt-test-harness") { |
| edition = "2021" |
| with_unit_tests = true |
| testonly = true |
| |
| # These are the library and code dependencies of the bt-test-harness library. |
| deps = [ |
| "//sdk/fidl/fuchsia.bluetooth:fuchsia.bluetooth_rust", |
| "//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr_rust", |
| "//sdk/fidl/fuchsia.bluetooth.gatt:fuchsia.bluetooth.gatt_rust", |
| "//sdk/fidl/fuchsia.bluetooth.le:fuchsia.bluetooth.le_rust", |
| "//sdk/fidl/fuchsia.bluetooth.snoop:fuchsia.bluetooth.snoop_rust", |
| "//sdk/fidl/fuchsia.bluetooth.sys:fuchsia.bluetooth.sys_rust", |
| "//sdk/fidl/fuchsia.bluetooth.test:fuchsia.bluetooth.test_rust", |
| "//sdk/fidl/fuchsia.component:fuchsia.component_rust", |
| "//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_rust", |
| "//sdk/fidl/fuchsia.device:fuchsia.device_rust", |
| "//sdk/fidl/fuchsia.driver.test:fuchsia.driver.test_rust", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_rust", |
| "//sdk/fidl/fuchsia.stash:fuchsia.stash_rust", |
| "//src/connectivity/bluetooth/fidl:host_rust", |
| "//src/connectivity/bluetooth/lib/fuchsia-bluetooth", |
| "//src/connectivity/bluetooth/testing/hci-emulator-client", |
| "//src/connectivity/bluetooth/testing/realmbuilder-mock-helpers", |
| "//src/connectivity/bluetooth/testing/test-harness", |
| "//src/lib/diagnostics/reader/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-component-test", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| # Components included in `deps` because they're used by CoreRealm and/or HostRealm |
| deps += [ |
| ":test-bt-init", |
| ":test-bt-init-config", |
| "//sdk/lib/driver_test_realm/realm_builder/rust", |
| "//src/connectivity/bluetooth/core/bt-gap:test-stash-secure", |
| "//src/connectivity/bluetooth/hci/virtual:driver", |
| "//src/devices/bus/drivers/platform", |
| "//src/devices/misc/drivers/test", |
| "//src/devices/tests/sysdev", |
| "//src/sys/lib/cm_rust", |
| "//src/sys/lib/cm_types", |
| ] |
| |
| test_deps = [ |
| "//sdk/fidl/fuchsia.process:fuchsia.process_rust", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-sync", |
| "//third_party/rust_crates:pin-utils", |
| "//third_party/rust_crates:proptest", |
| "//third_party/rust_crates:thiserror", |
| ] |
| |
| sources = [ |
| "src/access.rs", |
| "src/bootstrap.rs", |
| "src/core_realm.rs", |
| "src/emulator.rs", |
| "src/host.rs", |
| "src/host_realm.rs", |
| "src/host_watcher.rs", |
| "src/inspect.rs", |
| "src/lib.rs", |
| "src/low_energy_central.rs", |
| "src/low_energy_peripheral.rs", |
| "src/profile.rs", |
| ] |
| |
| configs -= [ "//build/config/rust/lints:allow_unused_results" ] |
| } |
| |
| fuchsia_component_manifest("test_bt_init_manifest") { |
| component_name = "test-bt-init" |
| manifest = "meta/test-bt-init.cml" |
| } |
| |
| fuchsia_structured_config_values("test-bt-init-config") { |
| cm_label = ":test_bt_init_manifest" |
| values = { |
| autostart_snoop = true |
| } |
| } |
| |
| fuchsia_component("test-bt-init") { |
| cm_label = ":test_bt_init_manifest" |
| deps = [ |
| "//src/connectivity/bluetooth/core/bt-gap:component", |
| "//src/connectivity/bluetooth/core/bt-host", |
| "//src/connectivity/bluetooth/core/bt-init:bin", |
| "//src/connectivity/bluetooth/profiles/bt-rfcomm:component", |
| ] |
| } |