blob: b592793f3cb2de5188982f8e5a8d06688f1c8846 [file] [log] [blame]
# Copyright 2018 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/rust/rustc_library.gni")
import("//src/sys/build/components.gni")
rustc_library("fuchsia-bluetooth") {
name = "fuchsia_bluetooth"
version = "0.1.0"
edition = "2018"
with_unit_tests = true
# TODO(armansito): Split out testing code into a separate library and move
# test-specific dependencies out.
deps = [
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.bluetooth:fuchsia.bluetooth-rustc",
"//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr-rustc",
"//sdk/fidl/fuchsia.bluetooth.control:fuchsia.bluetooth.control-rustc",
"//sdk/fidl/fuchsia.bluetooth.le:fuchsia.bluetooth.le-rustc",
"//sdk/fidl/fuchsia.bluetooth.sys:fuchsia.bluetooth.sys-rustc",
"//sdk/fidl/fuchsia.bluetooth.test:fuchsia.bluetooth.test-rustc",
"//sdk/fidl/fuchsia.device:fuchsia.device-rustc",
"//sdk/fidl/fuchsia.device.test:fuchsia.device.test-rustc",
"//sdk/fidl/fuchsia.hardware.bluetooth:fuchsia.hardware.bluetooth-rustc",
"//src/lib/diagnostics/inspect/contrib/rust",
"//src/lib/diagnostics/inspect/derive",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/storage/fuchsia-vfs-watcher",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:byteorder",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:lazy_static",
"//third_party/rust_crates:log",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:pretty",
"//third_party/rust_crates:proptest",
"//third_party/rust_crates:rand",
"//third_party/rust_crates:serde",
"//third_party/rust_crates:slab",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:uuid",
]
test_deps = [ "//third_party/rust_crates:matches" ]
sources = [
"src/assigned_numbers.rs",
"src/assigned_numbers/constants.rs",
"src/constants.rs",
"src/detachable_map.rs",
"src/device_watcher.rs",
"src/error.rs",
"src/expectation.rs",
"src/expectation/asynchronous.rs",
"src/expectation/host_driver.rs",
"src/expectation/peer.rs",
"src/expectation/prelude.rs",
"src/expectation/test.rs",
"src/hci_emulator.rs",
"src/host.rs",
"src/inspect.rs",
"src/lib.rs",
"src/profile.rs",
"src/types.rs",
"src/types/adapter_info.rs",
"src/types/address.rs",
"src/types/bonding_data.rs",
"src/types/channel.rs",
"src/types/emulator.rs",
"src/types/host_info.rs",
"src/types/id.rs",
"src/types/io_capabilities.rs",
"src/types/le.rs",
"src/types/pairing_options.rs",
"src/types/peer.rs",
"src/types/uuid.rs",
"src/util.rs",
]
}
fuchsia_unittest_package("bluetooth-crate-tests") {
manifest = "meta/bluetooth-crate-unittests.cmx"
deps = [
":fuchsia-bluetooth_test",
# TODO(armansito): The bt-hci-emulator driver is a runtime dependency of the test utilities
# contained within the crate. We should separate them out into a testing library and have that
# depend on this driver.
"//src/connectivity/bluetooth/hci/emulator",
]
}
group("tests") {
testonly = true
deps = [ ":bluetooth-crate-tests" ]
}