| # 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/components.gni") |
| import("//build/rust/rustc_binary.gni") |
| |
| rustc_binary("bin") { |
| output_name = "bt-le-central" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.bluetooth:fuchsia.bluetooth-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.gatt:fuchsia.bluetooth.gatt-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.le:fuchsia.bluetooth.le-rustc", |
| "//src/connectivity/bluetooth/lib/bt-fidl-mocks", |
| "//src/connectivity/bluetooth/lib/fuchsia-bluetooth", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:getopts", |
| "//third_party/rust_crates:num", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates/transitional/rustyline", |
| ] |
| |
| sources = [ |
| "src/central.rs", |
| "src/gatt.rs", |
| "src/gatt/commands.rs", |
| "src/gatt/repl.rs", |
| "src/gatt/types.rs", |
| "src/main.rs", |
| ] |
| } |
| |
| fuchsia_shell_package("bt-le-central") { |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_unittest_package("bt-le-central-unittests") { |
| manifest = "meta/bt-le-central-unittests.cmx" |
| deps = [ ":bin_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bt-le-central-unittests" ] |
| } |