blob: 1fb8eb3660abc4d2f8c96ed8d18ded4b51ee6db1 [file] [log] [blame] [edit]
# Copyright 2021 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_library.gni")
rustc_library("battery-client") {
edition = "2021"
name = "battery-client"
with_unit_tests = true
deps = [
"//sdk/fidl/fuchsia.power.battery:fuchsia.power.battery_rust",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-component",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:derivative",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:log",
"//third_party/rust_crates:thiserror",
]
test_deps = [
"//src/connectivity/bluetooth/lib/async-helpers:async-test-helpers",
"//src/lib/async-utils",
"//src/lib/fuchsia",
"//src/lib/fuchsia-async",
"//third_party/rust_crates:assert_matches",
]
sources = [
"src/error.rs",
"src/lib.rs",
]
configs -= [ "//build/config/rust/lints:allow_unused_results" ]
}
fuchsia_unittest_package("battery-client-tests") {
deps = [ ":battery-client_test" ]
}
group("tests") {
testonly = true
deps = [ ":battery-client-tests" ]
}