| # Copyright 2024 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_test.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":interaction-state-test" ] |
| } |
| |
| rustc_test("interaction_state_test") { |
| edition = "2021" |
| deps = [ |
| "//sdk/fidl/fuchsia.input:fuchsia.input_rust", |
| "//sdk/fidl/fuchsia.input.interaction:fuchsia.input.interaction_rust", |
| "//sdk/fidl/fuchsia.input.report:fuchsia.input.report_rust", |
| "//sdk/fidl/fuchsia.logger:fuchsia.logger_rust", |
| "//sdk/fidl/fuchsia.math:fuchsia.math_rust", |
| "//sdk/fidl/fuchsia.scheduler:fuchsia.scheduler_rust", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_rust", |
| "//sdk/fidl/fuchsia.sysmem2:fuchsia.sysmem2_rust", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider_rust", |
| "//sdk/fidl/fuchsia.ui.test.input:fuchsia.ui.test.input_rust", |
| "//sdk/fidl/fuchsia.vulkan.loader:fuchsia.vulkan.loader_rust", |
| "//sdk/rust/zx", |
| "//src/lib/async-utils", |
| "//src/lib/fidl/rust/fidl", |
| "//src/lib/fuchsia", |
| "//src/lib/fuchsia-async", |
| "//src/lib/fuchsia-component-test", |
| "//src/sys/lib/cm_rust", |
| "//src/ui/testing/test_ui_stack:flatland_scene_manager_config", |
| "//src/ui/testing/test_ui_stack:test-ui-stack-component", |
| "//third_party/rust_crates:futures", |
| "//third_party/rust_crates:test-case", |
| ] |
| |
| sources = [ "src/lib.rs" ] |
| } |
| |
| fuchsia_test_component("interaction-state-test-component") { |
| testonly = true |
| test_type = "system" |
| manifest = "meta/interaction-state-test.cml" |
| deps = [ ":interaction_state_test" ] |
| } |
| |
| fuchsia_test_package("interaction-state-test") { |
| test_components = [ ":interaction-state-test-component" ] |
| test_specs = { |
| # Since the interaction-state-test is timer-based, running |
| # some in parallel meaningfully reduces the total running |
| # time of the test suite. This should be taken in balance, |
| # since each simultaneous test runs its own instance of |
| # several UI components (scenic, scene manager, and |
| # others), multiplying impact on memory pressure. |
| parallel = 2 |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| environments = [ |
| { |
| dimensions = { |
| # Ensure the device has Vulkan. |
| device_type = "AEMU" |
| } |
| }, |
| ] |
| } |
| } |