blob: 4b1f4d6c3ae6f14bf3b70315d39e6f0cae6262f7 [file] [log] [blame]
# 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/config.gni")
import("//build/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
import("//third_party/protobuf/proto_library.gni")
rustc_binary("bin") {
name = "bt_a2dp_sink"
edition = "2018"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.bluetooth:fuchsia.bluetooth-rustc",
"//sdk/fidl/fuchsia.bluetooth.avdtp:fuchsia.bluetooth.avdtp-rustc",
"//sdk/fidl/fuchsia.bluetooth.avrcp:fuchsia.bluetooth.avrcp-rustc",
"//sdk/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr-rustc",
"//sdk/fidl/fuchsia.cobalt:fuchsia.cobalt-rustc",
"//sdk/fidl/fuchsia.media:fuchsia.media-rustc",
"//sdk/fidl/fuchsia.media.playback:fuchsia.media.playback-rustc",
"//sdk/fidl/fuchsia.media.sessions2:fuchsia.media.sessions2-rustc",
"//sdk/fidl/fuchsia.mem:fuchsia.mem-rustc",
"//sdk/fidl/fuchsia.settings:fuchsia.settings-rustc",
"//src/connectivity/bluetooth/fidl:component-rustc",
"//src/connectivity/bluetooth/lib/async-helpers",
"//src/connectivity/bluetooth/lib/bt-a2dp",
"//src/connectivity/bluetooth/lib/bt-a2dp:bt_a2dp_metrics_rustlib",
"//src/connectivity/bluetooth/lib/bt-avdtp",
"//src/connectivity/bluetooth/lib/fuchsia-audio-codec",
"//src/connectivity/bluetooth/lib/fuchsia-bluetooth",
"//src/lib/async-utils",
"//src/lib/cobalt/rust:fuchsia-cobalt",
"//src/lib/diagnostics/inspect/contrib/rust",
"//src/lib/diagnostics/inspect/derive",
"//src/lib/diagnostics/inspect/rust",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fidl_table_validation",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/syslog/rust:syslog",
"//src/lib/trace/rust:trace",
"//src/lib/trace/rust:trace-provider",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:bitfield",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:matches",
"//third_party/rust_crates:nom",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:serde_json",
"//third_party/rust_crates:slab",
"//third_party/rust_crates:thiserror",
]
test_deps = [ "//third_party/rust_crates:futures-test" ]
# TODO(fxbug.dev/56138): Fix the leaks and remove this.
non_rust_deps = [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ]
sources = [
"src/avrcp_relay.rs",
"src/latm.rs",
"src/main.rs",
"src/player.rs",
"src/sink_task.rs",
"src/volume_relay.rs",
]
}
package("bt-a2dp-sink") {
deps = [
":bin",
"//src/connectivity/bluetooth/lib/bt-a2dp:bt_a2dp_metrics",
]
binaries = [
{
name = "bt_a2dp_sink"
},
]
meta = [
{
path = rebase_path("meta/bt-a2dp-sink.cmx")
dest = "bt-a2dp-sink.cmx"
},
]
}
config_data("startup_config") {
for_pkg = "sysmgr"
outputs = [ "bt-a2dp-startup.config" ]
sources = [ "startup.config" ]
}
test_package("tests") {
package_name = "bt-a2dp-sink-tests"
deps = [ ":bin_test" ]
tests = [
{
name = "bt_a2dp_sink_bin_test"
dest = "bt-a2dp-sink-unittests"
environments = basic_envs
},
]
}