| # 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("bt-device-watcher") { |
| with_unit_tests = true |
| |
| deps = [ |
| "//garnet/lib/rust/io_util", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//src/connectivity/bluetooth/lib/fuchsia-bluetooth", |
| "//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:futures", |
| "//third_party/rust_crates:log", |
| ] |
| |
| test_deps = [ |
| "//sdk/fidl/fuchsia.device.test:fuchsia.device.test-rustc", |
| "//sdk/fidl/fuchsia.driver.test:fuchsia.driver.test-rustc", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger-rustc", |
| "//sdk/fidl/fuchsia.process:fuchsia.process-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//sdk/lib/device-watcher/rust", |
| "//sdk/lib/driver_test_realm/realm_builder/rust", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component-test", |
| "//third_party/rust_crates:assert_matches", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| |
| configs -= [ "//build/config/rust:allow_unused_results" ] |
| } |
| |
| fuchsia_unittest_package("bt-device-watcher-tests") { |
| deps = [ |
| ":bt-device-watcher_test", |
| "//src/devices/misc/drivers/test", |
| "//src/devices/misc/drivers/test-parent:test-parent-sys", |
| ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bt-device-watcher-tests" ] |
| } |