blob: 0d2bf2c25ac750a22332a148e4af214822d48cc8 [file] [log] [blame]
# Copyright 2023 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")
import("//src/sys/core/build/core_shard.gni")
rustc_library("bt-map") {
edition = "2021"
with_unit_tests = true
deps = [
"//src/connectivity/bluetooth/lib/bt-obex/objects",
"//src/connectivity/bluetooth/lib/packet-encoding",
"//third_party/rust_crates:bitflags",
"//third_party/rust_crates:chrono",
"//third_party/rust_crates:hex",
"//third_party/rust_crates:thiserror",
"//third_party/rust_crates:tracing",
"//third_party/rust_crates:xml-rs",
]
test_deps = [ "//src/lib/fuchsia" ]
sources = [
"src/lib.rs",
"src/packets/messages_listing.rs",
"src/packets/mod.rs",
]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
resource("test-files") {
sources = [
"//src/connectivity/bluetooth/lib/bt-obex/objects/test/bad_sample.xml",
"test/bad_sample_messages_listing_v1_0_1.xml",
"test/bad_sample_messages_listing_v1_0_2.xml",
"test/bad_sample_messages_listing_v1_1_1.xml",
"test/bad_sample_messages_listing_v1_1_2.xml",
"test/sample_messages_listing_v1_0_1.xml",
"test/sample_messages_listing_v1_0_2.xml",
"test/sample_messages_listing_v1_1_1.xml",
"test/sample_messages_listing_v1_1_2.xml",
]
outputs = [ "data/{{source_file_part}}" ]
}
fuchsia_unittest_package("bt-map-tests") {
deps = [
":bt-map_test",
":test-files",
]
}
group("tests") {
testonly = true
deps = [ ":bt-map-tests" ]
}