blob: 81d6f4f2715585d29442273fa484915ac741ff3b [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/package.gni")
import("//build/rust/rustc_binary.gni")
import("//build/test/test_package.gni")
rustc_binary("bin") {
name = "bt_gap"
edition = "2018"
with_unit_tests = true
deps = [
"//garnet/lib/bluetooth/fidl:fuchsia.bluetooth.host-rustc",
"//garnet/lib/rust/fuchsia-bluetooth",
"//garnet/public/fidl/fuchsia.bluetooth:fuchsia.bluetooth-rustc",
"//garnet/public/fidl/fuchsia.bluetooth.bredr:fuchsia.bluetooth.bredr-rustc",
"//garnet/public/fidl/fuchsia.bluetooth.control:fuchsia.bluetooth.control-rustc",
"//garnet/public/fidl/fuchsia.bluetooth.gatt:fuchsia.bluetooth.gatt-rustc",
"//garnet/public/fidl/fuchsia.bluetooth.le:fuchsia.bluetooth.le-rustc",
"//garnet/public/fidl/fuchsia.stash:fuchsia.stash-rustc",
"//garnet/public/lib/fidl/rust/fidl",
"//garnet/public/rust/fdio",
"//garnet/public/rust/fuchsia-app",
"//garnet/public/rust/fuchsia-async",
"//garnet/public/rust/fuchsia-syslog",
"//garnet/public/rust/fuchsia-vfs/fuchsia-vfs-watcher",
"//garnet/public/rust/fuchsia-zircon",
"//third_party/rust-crates/rustc_deps:failure",
"//third_party/rust-crates/rustc_deps:futures-preview",
"//third_party/rust-crates/rustc_deps:log",
"//third_party/rust-crates/rustc_deps:parking_lot",
"//third_party/rust-crates/rustc_deps:pin-utils",
"//third_party/rust-crates/rustc_deps:serde",
"//third_party/rust-crates/rustc_deps:serde_derive",
"//third_party/rust-crates/rustc_deps:serde_json",
"//third_party/rust-crates/rustc_deps:slab",
]
}
package("bt-gap") {
deps = [
":bin",
]
binary = "rust_crates/bt_gap"
meta = [
{
path = rebase_path("meta/bt-gap.cmx")
dest = "bt-gap.cmx"
},
]
}
# TODO(BLD-338): Rename target to the less-redundant "tests" when target names
# no longer have to match package names.
test_package("bt-gap-tests") {
deps = [
":bin",
]
tests = [
{
name = "bt_gap_bin_test"
dest = "bt-gap-unittests"
},
]
}