| # 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/package.gni") |
| import("//build/rust/rustc_binary.gni") |
| import("//build/test/test_package.gni") |
| import("//build/testing/environments.gni") |
| |
| rustc_binary("bin") { |
| name = "bt_cli" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.bluetooth:fuchsia.bluetooth-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.control:fuchsia.bluetooth.control-rustc", |
| "//sdk/fidl/fuchsia.bluetooth.sys:fuchsia.bluetooth.sys-rustc", |
| "//src/connectivity/bluetooth/lib/bt-fidl-mocks", |
| "//src/connectivity/bluetooth/lib/fuchsia-bluetooth", |
| "//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:parking_lot", |
| "//third_party/rust_crates:pin-utils", |
| "//third_party/rust_crates:regex", |
| "//third_party/rust_crates:thiserror", |
| "//third_party/rust_crates/transitional/rustyline", |
| ] |
| |
| sources = [ |
| "src/commands.rs", |
| "src/main.rs", |
| "src/types.rs", |
| ] |
| } |
| |
| package("bt-cli") { |
| name = "bt_cli" |
| |
| deps = [ ":bin" ] |
| |
| binaries = [ |
| { |
| name = "bt_cli" |
| dest = "bt-cli" |
| shell = true |
| }, |
| ] |
| } |
| |
| test_package("tests") { |
| package_name = "bt-cli-tests" |
| |
| deps = [ ":bin_test" ] |
| |
| tests = [ |
| { |
| name = "bt_cli_bin_test" |
| dest = "bt-cli-unittests" |
| environments = basic_envs |
| }, |
| ] |
| } |