blob: 7064893a1e0aa1b296bcd49414bdf1f03c8b0ab7 [file] [log] [blame]
# 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/rust/rustc_library.gni")
rustc_library("hci-emulator-client") {
edition = "2021"
with_unit_tests = true
testonly = true
deps = [
"//sdk/fidl/fuchsia.bluetooth:fuchsia.bluetooth_rust",
"//sdk/fidl/fuchsia.device:fuchsia.device_rust",
"//sdk/fidl/fuchsia.device.fs:fuchsia.device.fs_rust",
"//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth_rust",
"//sdk/fidl/fuchsia.io:fuchsia.io_rust",
"//sdk/lib/device-watcher/rust",
"//src/connectivity/bluetooth/lib/fuchsia-bluetooth",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/fuchsia-fs",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
test_deps = [
"//sdk/fidl/fuchsia.driver.test:fuchsia.driver.test_rust",
"//sdk/lib/driver_test_realm/realm_builder/rust",
"//src/lib/fuchsia",
"//src/lib/fuchsia-component-test",
]
sources = [
"src/lib.rs",
"src/types.rs",
]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
fuchsia_unittest_package("hci-emulator-client-tests") {
manifest = "meta/hci-emulator-client-tests.cml"
deps = [
":hci-emulator-client_test",
# No bt-host driver because we want to check the HCI device lifecycle directly.
"//src/connectivity/bluetooth/hci/virtual:driver",
"//src/devices/bus/drivers/platform",
]
test_specs = {
log_settings = {
# Spurious error logs expected during driver shutdown as it races with bind.
max_severity = "ERROR"
}
}
}
group("tests") {
testonly = true
deps = [
":hci-emulator-client-tests",
"//src/connectivity/bluetooth/hci/virtual",
]
}