| # 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", |
| "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| "//sdk/rust/zx", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-fs", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:log", |
| ] |
| |
| 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" ] |
| } |