| # 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") |
| import("//build/rust/rustc_library.gni") |
| |
| rustc_library("lib") { |
| name = "input_testing" |
| with_unit_tests = true |
| version = "0.1.0" |
| edition = "2021" |
| deps = [ |
| "//sdk/fidl/fuchsia.input:fuchsia.input_rust", |
| "//sdk/fidl/fuchsia.input.injection:fuchsia.input.injection_rust", |
| "//sdk/fidl/fuchsia.input.report:fuchsia.input.report_rust", |
| "//sdk/fidl/fuchsia.math:fuchsia.math_rust", |
| "//sdk/fidl/fuchsia.ui.display.singleton:fuchsia.ui.display.singleton_rust", |
| "//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_rust", |
| "//sdk/fidl/fuchsia.ui.test.input:fuchsia.ui.test.input_rust", |
| "//src/lib/async-utils", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component", |
| "//src/lib/ui/keymaps", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| test_deps = [ |
| "//src/lib/zircon/rust:fuchsia-zircon", |
| "//third_party/rust_crates:assert_matches", |
| "//third_party/rust_crates:pretty_assertions", |
| "//third_party/rust_crates:test-case", |
| ] |
| |
| sources = [ |
| "src/input_device.rs", |
| "src/input_device_registry.rs", |
| "src/input_reports_reader.rs", |
| "src/lib.rs", |
| ] |
| } |
| |
| rustc_binary("input_helper_bin") { |
| output_name = "input_helper_bin" |
| edition = "2021" |
| deps = [ |
| ":lib", |
| "//sdk/fidl/fuchsia.ui.test.input:fuchsia.ui.test.input_rust", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-component", |
| "//third_party/rust_crates:anyhow", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:tracing", |
| ] |
| |
| sources = [ "src/main.rs" ] |
| } |
| |
| fuchsia_component("input-helper-component") { |
| component_name = "input-helper" |
| manifest = "meta/input-helper.cml" |
| deps = [ ":input_helper_bin" ] |
| } |
| |
| fuchsia_unittest_package("input-helper-tests") { |
| deps = [ ":lib_test" ] |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":input-helper-tests" ] |
| } |