| # Copyright 2024 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") { |
| edition = "2021" |
| output_name = "bt_map_mce" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr_rust", |
| "//sdk/fidl/fuchsia.bluetooth.map:fuchsia.bluetooth.map_rust", |
| "//src/connectivity/bluetooth/lib/bt-map", |
| "//src/connectivity/bluetooth/lib/bt-obex", |
| "//src/connectivity/bluetooth/lib/fuchsia-bluetooth", |
| "//src/connectivity/bluetooth/lib/profile-client", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-sync", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| sources = [ |
| "src/fidl_service.rs", |
| "src/main.rs", |
| "src/messaging_client.rs", |
| "src/profile.rs", |
| ] |
| |
| configs -= [ "//build/config/rust/lints:allow_unused_results" ] |
| } |
| |
| fuchsia_component("component") { |
| component_name = "bt-map-mce" |
| manifest = "meta/bt-map-mce.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_package("bt-map-mce") { |
| deps = [ ":component" ] |
| } |
| |
| fuchsia_unittest_package("bt-map-mce-unittests") { |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| deps = [ ":bin_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":bt-map-mce-unittests" ] |
| } |