blob: 794e02319a3ce5f11eea1921b95c9dcfa750ee55 [file]
# Copyright 2019 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")
import("//build/testing/environments.gni")
rustc_binary("bin") {
name = "battery_manager"
with_unit_tests = true
edition = "2018"
deps = [
"//garnet/lib/rust/fidl_fuchsia_power_ext",
"//garnet/lib/rust/io_util",
"//sdk/fidl/fuchsia.power:fuchsia.power-rustc",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia-async",
"//src/lib/fuchsia-component",
"//src/lib/storage/fuchsia-vfs-watcher",
"//src/lib/syslog/rust:syslog",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:libc",
"//third_party/rust_crates:log",
"//third_party/rust_crates:parking_lot",
"//third_party/rust_crates:thiserror",
"//zircon/system/fidl/fuchsia-hardware-power:fuchsia-hardware-power-rustc",
]
}
package("battery_manager") {
deps = [ ":bin" ]
binary = "battery_manager"
meta = [
{
path = rebase_path("meta/battery_manager.cmx")
dest = "battery_manager.cmx"
},
]
}
test_package("battery_manager_tests") {
deps = [ ":bin_test" ]
tests = [
{
name = "battery_manager_bin_test"
environments = basic_envs
},
]
}
group("tests") {
testonly = true
public_deps = [
":battery_manager_tests",
"//src/power/battery_manager/tests:battery_manager_gotests",
]
}