blob: 949cdb0100f78c3264156d157d8a6a84eb3fca30 [file] [log] [blame]
# Copyright 2022 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")
rustc_binary("bin") {
name = "display-tweak"
with_unit_tests = true
edition = "2021"
deps = [
"//sdk/fidl/fuchsia.hardware.backlight:fuchsia.hardware.backlight_rust",
"//sdk/fidl/fuchsia.hardware.display:fuchsia.hardware.display_rust",
"//src/lib/fdio/rust:fdio",
"//src/lib/fidl/rust/fidl",
"//src/lib/fuchsia",
"//src/lib/zircon/rust:fuchsia-zircon",
"//third_party/rust_crates:anyhow",
"//third_party/rust_crates:argh",
"//third_party/rust_crates:futures",
"//third_party/rust_crates:tracing",
]
test_deps = [
"//sdk/fidl/fuchsia.hardware.display.types:fuchsia.hardware.display.types_rust",
"//third_party/rust_crates:assert_matches",
]
sources = [
"src/backlight.rs",
"src/main.rs",
"src/panel.rs",
"src/utils.rs",
]
}
fuchsia_package_with_single_component("display-tweak-pkg") {
component_name = "display_tweak"
manifest = "meta/display-tweak.cml"
deps = [ ":bin" ]
}
fuchsia_package("display-tweak") {
deps = [ ":bin" ]
}
fuchsia_unittest_package("display-tweak-tests") {
deps = [ ":bin_test" ]
}
group("tests") {
testonly = true
deps = [ ":display-tweak-tests" ]
}