| # 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/config.gni") |
| |
| group("tests") { |
| testonly = true |
| deps = [ |
| ":mouse-input-test", |
| "//src/cobalt/bin/testing/mock_cobalt", |
| |
| # TODO(https://fxbug.dev/42070261): These should be provided by the Product |
| # configurations on which these tests run rather than as deps. |
| # TODO(https://fxbug.dev/42070261): Should these be deps of the individual test |
| # targets above? |
| "//src/chromium:web_context_provider_for_test", |
| "//src/graphics/bin/vulkan_loader", |
| "//src/testing/fidl/intl_property_manager", |
| ] |
| } |
| |
| executable("mouse-input-test-bin") { |
| testonly = true |
| sources = [ "mouse-input-test.cc" ] |
| output_name = "mouse-input-test" |
| deps = [ |
| "//sdk/fidl/fuchsia.accessibility.semantics:fuchsia.accessibility.semantics_hlcpp", |
| "//sdk/fidl/fuchsia.buildinfo:fuchsia.buildinfo_hlcpp", |
| "//sdk/fidl/fuchsia.component:fuchsia.component_hlcpp", |
| "//sdk/fidl/fuchsia.fonts:fuchsia.fonts_hlcpp", |
| "//sdk/fidl/fuchsia.kernel:fuchsia.kernel_hlcpp", |
| "//sdk/fidl/fuchsia.memorypressure:fuchsia.memorypressure_hlcpp", |
| "//sdk/fidl/fuchsia.metrics:fuchsia.metrics_hlcpp", |
| "//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_hlcpp", |
| "//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket_hlcpp", |
| "//sdk/fidl/fuchsia.process:fuchsia.process_hlcpp", |
| "//sdk/fidl/fuchsia.scheduler:fuchsia.scheduler_hlcpp", |
| "//sdk/fidl/fuchsia.session.scene:fuchsia.session.scene_hlcpp", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider_hlcpp", |
| "//sdk/fidl/fuchsia.ui.app:fuchsia.ui.app_hlcpp", |
| "//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_hlcpp", |
| "//sdk/fidl/fuchsia.ui.scenic:fuchsia.ui.scenic_hlcpp", |
| "//sdk/fidl/fuchsia.vulkan.loader:fuchsia.vulkan.loader_hlcpp", |
| "//sdk/fidl/fuchsia.web:fuchsia.web_hlcpp", |
| "//sdk/lib/sys/component/cpp/testing:cpp", |
| "//sdk/lib/sys/cpp", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/lib/testing/loop_fixture", |
| "//src/ui/testing/util:portable_ui_test", |
| "//third_party/googletest:gtest", |
| "//zircon/system/ulib/async-loop:async-loop-cpp", |
| "//zircon/system/ulib/async-loop:async-loop-default", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| fuchsia_test_component("mouse-input-test-component") { |
| restricted_features = [ "allow_non_hermetic_packages" ] |
| component_name = "mouse_input_test" |
| manifest = "meta/mouse-input-test.cml" |
| deps = [ ":mouse-input-test-bin" ] |
| test_type = "system" |
| } |
| |
| fuchsia_test_package("mouse-input-test") { |
| test_components = [ ":mouse-input-test-component" ] |
| deps = [ |
| # The test realms. |
| "mouse-input-chromium:mouse-input-chromium-component", |
| |
| # TODO(https://fxbug.dev/42070261): This should be provided by the Product |
| # configurations on which these tests run rather than as deps. |
| "//src/chromium:web_context_provider_for_test", |
| |
| # Launched in the test realm for hermeticity. |
| "//src/cobalt/bin/testing/mock_cobalt", |
| "//src/connectivity/network:netstack-for-tests", |
| "//src/developer/build_info/testing:fake-build-info-component", |
| "//src/developer/memory/monitor:component", |
| "//src/fonts:font_provider_hermetic_for_test", |
| |
| # Include some default config (it doesn't matter which, since we're going to override it). |
| "//src/ui/testing/test_ui_stack:flatland_scene_manager_config", |
| "//src/ui/testing/test_ui_stack:test-ui-stack-component", |
| ] |
| test_specs = { |
| # Do not fail the test if a message with level ERROR is logged. Several |
| # components will log ERROR if they miss a non-essential FIDL API in the |
| # sandbox, which would make the test fail if it weren't for this. Ideally, |
| # we should have a setup that does not have such errors at all, but adding |
| # ever more components to satisfy all FIDL dependencies expands the test |
| # graph beyond what is practical for testing. In the future we may strike a |
| # balance such that this becomes a non-issue, and that this could be |
| # removed. |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| environments = [ |
| { |
| dimensions = { |
| # Ensure the device has Vulkan. |
| device_type = "AEMU" |
| } |
| }, |
| ] |
| } |
| } |