| # Copyright 2019 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/config.gni") |
| 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_a2dp_manager" |
| edition = "2018" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.bluetooth.a2dp:fuchsia.bluetooth.a2dp-rustc", |
| "//sdk/fidl/fuchsia.io:fuchsia.io-rustc", |
| "//sdk/fidl/fuchsia.sys:fuchsia.sys-rustc", |
| "//src/connectivity/bluetooth/fidl:component-rustc", |
| "//src/lib/async-utils", |
| "//src/lib/diagnostics/inspect/contrib/rust", |
| "//src/lib/diagnostics/inspect/derive", |
| "//src/lib/diagnostics/inspect/rust", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| "//third_party/rust_crates:matches", |
| ] |
| |
| sources = [ |
| "src/inspect.rs", |
| "src/main.rs", |
| "src/test_util.rs", |
| "src/util.rs", |
| ] |
| } |
| |
| package("bt-a2dp-manager") { |
| deps = [ ":bin" ] |
| |
| binaries = [ |
| { |
| name = "bt_a2dp_manager" |
| }, |
| ] |
| meta = [ |
| { |
| path = rebase_path("meta/bt-a2dp-manager.cmx") |
| dest = "bt-a2dp-manager.cmx" |
| }, |
| ] |
| } |
| |
| config_data("startup_config") { |
| for_pkg = "sysmgr" |
| outputs = [ "bt-a2dp-manager.config" ] |
| sources = [ "service.config" ] |
| } |
| |
| test_package("bt-a2dp-manager-tests") { |
| deps = [ ":bin_test" ] |
| |
| tests = [ |
| { |
| name = "bt_a2dp_manager_bin_test" |
| dest = "bt-a2dp-manager-unittests" |
| environments = basic_envs |
| }, |
| ] |
| } |