| Dragoș Tiselice | a4ba3e8 | 2019-06-04 09:47:31 +0000 | [diff] [blame] | 1 | # Copyright 2019 The Fuchsia Authors. All rights reserved. |
| 2 | # Use of this source code is governed by a BSD-style license that can be |
| 3 | # found in the LICENSE file. |
| 4 | |
| Shai Barack | 6a58d99 | 2021-04-14 05:50:58 +0000 | [diff] [blame] | 5 | import("//build/components.gni") |
| Filip Filmar | 7c75ec5 | 2022-02-02 15:10:59 +0000 | [diff] [blame] | 6 | import("//build/fidl/fidl.gni") |
| 7 | import("//build/rust/rustc_binary.gni") |
| Dragoș Tiselice | a4ba3e8 | 2019-06-04 09:47:31 +0000 | [diff] [blame] | 8 | import("//build/rust/rustc_library.gni") |
| 9 | |
| Filip Filmar | 7c75ec5 | 2022-02-02 15:10:59 +0000 | [diff] [blame] | 10 | fidl("test.inputsynthesis") { |
| 11 | testonly = true |
| 12 | sources = [ "input_synthesis.test.fidl" ] |
| chaopeng | ed594c31 | 2022-06-02 01:16:50 +0000 | [diff] [blame] | 13 | public_deps = [ "//sdk/fidl/fuchsia.input.report" ] |
| Ian McKellar | ef9ca80 | 2023-01-19 01:22:38 +0000 | [diff] [blame] | 14 | enable_hlcpp = true |
| Filip Filmar | 7c75ec5 | 2022-02-02 15:10:59 +0000 | [diff] [blame] | 15 | } |
| 16 | |
| Dragoș Tiselice | a4ba3e8 | 2019-06-04 09:47:31 +0000 | [diff] [blame] | 17 | rustc_library("input-synthesis") { |
| 18 | name = "input-synthesis" |
| 19 | with_unit_tests = true |
| 20 | version = "0.1.0" |
| Sarah Chan | 5393930 | 2025-12-06 16:06:32 -0800 | [diff] [blame^] | 21 | edition = "2021" |
| Dragoș Tiselice | a4ba3e8 | 2019-06-04 09:47:31 +0000 | [diff] [blame] | 22 | deps = [ |
| Mitchell Kember | 0c5eddb | 2022-07-28 23:36:32 +0000 | [diff] [blame] | 23 | "//sdk/fidl/fuchsia.input:fuchsia.input_rust", |
| 24 | "//sdk/fidl/fuchsia.input.injection:fuchsia.input.injection_rust", |
| 25 | "//sdk/fidl/fuchsia.input.report:fuchsia.input.report_rust", |
| 26 | "//sdk/fidl/fuchsia.io:fuchsia.io_rust", |
| 27 | "//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_rust", |
| 28 | "//sdk/fidl/fuchsia.ui.input3:fuchsia.ui.input3_rust", |
| Adam Perry | 180a49c | 2024-10-03 06:38:50 +0000 | [diff] [blame] | 29 | "//sdk/rust/zx", |
| Mitchell Kember | 1f6c412 | 2020-01-17 01:05:23 +0000 | [diff] [blame] | 30 | "//src/lib/fidl/rust/fidl", |
| Benjamin Brittain | 0f7bcf3 | 2019-12-30 15:37:50 +0000 | [diff] [blame] | 31 | "//src/lib/fuchsia-async", |
| Benjamin Brittain | 88d362c | 2019-12-27 17:15:23 -0500 | [diff] [blame] | 32 | "//src/lib/fuchsia-component", |
| Mukesh Agrawal | f298492 | 2021-06-11 20:45:22 +0000 | [diff] [blame] | 33 | "//src/lib/ui/keymaps", |
| Benjamin Brittain | 779d97a | 2019-12-24 00:41:22 +0000 | [diff] [blame] | 34 | "//third_party/rust_crates:anyhow", |
| Mukesh Agrawal | 2cae323 | 2020-11-18 21:22:28 +0000 | [diff] [blame] | 35 | "//third_party/rust_crates:async-trait", |
| Erick Tryzelaar | 730fc4f | 2019-11-08 08:02:23 +0000 | [diff] [blame] | 36 | "//third_party/rust_crates:futures", |
| Miguel Flores Ruiz de Eguino | cf0fc3a | 2025-01-06 12:03:46 -0800 | [diff] [blame] | 37 | "//third_party/rust_crates:log", |
| Filip Filmar | 9b751ea | 2021-03-12 20:39:12 +0000 | [diff] [blame] | 38 | "//third_party/rust_crates:serde", |
| Tamir Duberstein | d02bfc8 | 2022-07-20 06:50:46 +0000 | [diff] [blame] | 39 | ] |
| 40 | |
| 41 | test_deps = [ |
| 42 | "//third_party/rust_crates:assert_matches", |
| 43 | "//third_party/rust_crates:pretty_assertions", |
| Filip Filmar | 9b751ea | 2021-03-12 20:39:12 +0000 | [diff] [blame] | 44 | "//third_party/rust_crates:serde_json", |
| Mukesh Agrawal | 9bbe050 | 2020-11-18 00:57:53 +0000 | [diff] [blame] | 45 | "//third_party/rust_crates:test-case", |
| Dragoș Tiselice | a4ba3e8 | 2019-06-04 09:47:31 +0000 | [diff] [blame] | 46 | ] |
| Adam Lesinski | 9f39a12 | 2020-07-22 21:17:36 +0000 | [diff] [blame] | 47 | |
| Adam Lesinski | 9f39a12 | 2020-07-22 21:17:36 +0000 | [diff] [blame] | 48 | sources = [ |
| Adam Lesinski | 9f39a12 | 2020-07-22 21:17:36 +0000 | [diff] [blame] | 49 | "src/lib.rs", |
| Mukesh Agrawal | 321eeb24d | 2020-11-18 21:32:25 +0000 | [diff] [blame] | 50 | "src/modern_backend/input_device.rs", |
| 51 | "src/modern_backend/input_device_registry.rs", |
| 52 | "src/modern_backend/input_reports_reader.rs", |
| 53 | "src/modern_backend/mod.rs", |
| Mukesh Agrawal | e7390ef | 2020-10-08 02:33:27 +0000 | [diff] [blame] | 54 | "src/synthesizer.rs", |
| Adam Lesinski | 9f39a12 | 2020-07-22 21:17:36 +0000 | [diff] [blame] | 55 | ] |
| Vickie Cheng | b8dcf60 | 2021-03-11 18:11:03 +0000 | [diff] [blame] | 56 | } |
| 57 | |
| Victor Chang | 6848d8d | 2021-02-19 01:40:59 +0000 | [diff] [blame] | 58 | fuchsia_unittest_package("input-synthesis-tests") { |
| Haowei Wu | 172a828 | 2020-01-10 05:55:15 +0000 | [diff] [blame] | 59 | deps = [ ":input-synthesis_test" ] |
| Dragoș Tiselice | a4ba3e8 | 2019-06-04 09:47:31 +0000 | [diff] [blame] | 60 | } |
| Filip Filmar | 8cbe2e30 | 2021-03-30 19:37:45 +0000 | [diff] [blame] | 61 | |
| 62 | group("tests") { |
| 63 | testonly = true |
| 64 | deps = [ ":input-synthesis-tests" ] |
| 65 | } |