| # Copyright 2018 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 = "brightness_manager" |
| version = "0.1.0" |
| with_unit_tests = true |
| edition = "2018" |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.hardware.backlight:fuchsia.hardware.backlight-rustc", |
| "//sdk/fidl/fuchsia.hardware.input:fuchsia.hardware.input-rustc", |
| "//sdk/fidl/fuchsia.ui.brightness:fuchsia.ui.brightness-rustc", |
| "//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input-rustc", |
| "//src/lib/fdio/rust:fdio", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/fuchsia-runtime", |
| "//src/lib/syslog/rust:syslog", |
| "//src/lib/watch_handler:watch_handler", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:async-trait", |
| "//third_party/rust_crates:byteorder", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:futures-util", |
| "//third_party/rust_crates:lazy_static", |
| "//third_party/rust_crates:num-traits", |
| "//third_party/rust_crates:parking_lot", |
| "//third_party/rust_crates:serde", |
| "//third_party/rust_crates:serde_json", |
| "//third_party/rust_crates:splines", |
| "//third_party/rust_crates:thiserror", |
| ] |
| } |
| |
| package("brightness_manager") { |
| deps = [ ":bin" ] |
| binaries = [ |
| { |
| name = "brightness_manager" |
| }, |
| ] |
| meta = [ |
| { |
| path = rebase_path("meta/brightness_manager.cmx") |
| dest = "brightness_manager.cmx" |
| }, |
| ] |
| } |
| |
| test_package("brightness_manager_tests") { |
| deps = [ ":bin_test" ] |
| |
| tests = [ |
| { |
| name = "brightness_manager_bin_test" |
| dest = "brightness_manager_test" |
| environments = basic_envs |
| }, |
| ] |
| } |