blob: 20d574270efb202db137fe646a2cede73f56dd96 [file] [log] [blame]
# 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/testing/cc_test_executable.gni")
group("tests") {
testonly = true
deps = [
":mouse-input-test",
"//src/cobalt/bin/testing/fake_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",
]
}
cc_test_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_cpp",
"//sdk/fidl/fuchsia.buildinfo:fuchsia.buildinfo_cpp",
"//sdk/fidl/fuchsia.component:fuchsia.component_cpp",
"//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_cpp",
"//sdk/fidl/fuchsia.element:fuchsia.element_cpp",
"//sdk/fidl/fuchsia.fonts:fuchsia.fonts_cpp",
"//sdk/fidl/fuchsia.kernel:fuchsia.kernel_cpp",
"//sdk/fidl/fuchsia.memorypressure:fuchsia.memorypressure_cpp",
"//sdk/fidl/fuchsia.metrics:fuchsia.metrics_cpp",
"//sdk/fidl/fuchsia.net.interfaces:fuchsia.net.interfaces_cpp",
"//sdk/fidl/fuchsia.posix.socket:fuchsia.posix.socket_cpp",
"//sdk/fidl/fuchsia.process:fuchsia.process_cpp",
"//sdk/fidl/fuchsia.scheduler:fuchsia.scheduler_cpp",
"//sdk/fidl/fuchsia.session.scene:fuchsia.session.scene_cpp",
"//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider_cpp",
"//sdk/fidl/fuchsia.ui.app:fuchsia.ui.app_cpp",
"//sdk/fidl/fuchsia.ui.input:fuchsia.ui.input_cpp",
"//sdk/fidl/fuchsia.vulkan.loader:fuchsia.vulkan.loader_cpp",
"//sdk/fidl/fuchsia.web:fuchsia.web_cpp",
"//sdk/lib/async-loop:async-loop-cpp",
"//sdk/lib/async-loop:async-loop-default",
"//sdk/lib/component/outgoing/cpp",
"//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/zx",
# TODO(https://fxbug.dev/296294151): Fix after realm builder support new C++ binding.
"//sdk/fidl/fuchsia.component.decl:fuchsia.component.decl_cpp_hlcpp_conversion",
"//sdk/lib/fidl/cpp:hlcpp_conversion",
]
}
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/fake_cobalt",
"//src/connectivity/network:netstack-for-tests",
"//src/developer/build_info/testing:fake-build-info-component",
"//src/developer/memory/pressure_signaler: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"
}
},
]
}
}