| # 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_binary.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":display-tool-test" ] |
| } |
| |
| rustc_binary("bin") { |
| edition = "2021" |
| output_name = "display-tool" |
| with_unit_tests = true |
| |
| deps = [ |
| "//sdk/fidl/fuchsia.images2:fuchsia.images2_rust", |
| "//src/graphics/display/lib/rust/display-utils", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-image-format", |
| "//src/lib/mapped-vmo", |
| "//src/lib/trace/rust:trace", |
| "//src/lib/trace/rust:trace-provider", |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:argh", |
| "//third_party/rust_crates:euclid", |
| "//third_party/rust_crates:futures", |
| ] |
| |
| sources = [ |
| "src/commands.rs", |
| "src/commands/bouncing_squares.rs", |
| "src/commands/display_color_layer.rs", |
| "src/commands/frame_rate_test.rs", |
| "src/commands/static_config_vsync_loop.rs", |
| "src/draw.rs", |
| "src/fps.rs", |
| "src/main.rs", |
| "src/rgb.rs", |
| "src/runner.rs", |
| ] |
| |
| test_deps = [ "//src/lib/fuchsia" ] |
| } |
| |
| fuchsia_package_with_single_component("display-tool") { |
| manifest = "meta/display-tool.cml" |
| deps = [ ":bin" ] |
| } |
| |
| fuchsia_unittest_package("display-tool-test") { |
| deps = [ ":bin_test" ] |
| } |