blob: 7c56947700cfa469f061bb8ccae5dcc90a29a867 [file] [log] [blame]
# Copyright 2021 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("//src/graphics/lib/magma/gnbuild/magma.gni")
group("tests") {
testonly = true
public_deps = [
":display_integration_tests",
":flatland_integration_tests",
":gfx_integration_tests",
":hardware_env_tests_fxb91950",
":observer_integration_tests",
]
}
source_set("common_deps") {
testonly = true
sources = [
"utils/utils.cc",
"utils/utils.h",
]
public_deps = [
":scenic_realm_builder",
"//sdk/lib/syslog/cpp",
"//sdk/lib/ui/scenic/cpp",
"//src/lib/fxl/test:gtest_main",
"//src/lib/testing/loop_fixture",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
]
deps = [ "//src/lib/fostr/fidl/fuchsia.ui.input:fuchsia.ui.input" ]
}
source_set("common_deps_cts") {
testonly = true
sources = [
"utils/utils.cc",
"utils/utils.h",
]
public_deps = [
":scenic_realm_builder",
"//sdk/lib/syslog/cpp",
"//sdk/lib/ui/scenic/cpp",
"//zircon/system/ulib/async-loop/testing:async-loop-testing",
"//zircon/system/ulib/zxtest",
]
}
source_set("scenic_realm_builder") {
testonly = true
sources = [
"utils/scenic_realm_builder.cc",
"utils/scenic_realm_builder.h",
]
public_deps = [
"//sdk//fidl/fuchsia.logger",
"//sdk//fidl/fuchsia.scheduler",
"//sdk//fidl/fuchsia.tracing.provider",
"//sdk/fidl/fuchsia.sysmem",
"//sdk/fidl/fuchsia.ui.app",
"//sdk/fidl/fuchsia.ui.policy",
"//sdk/fidl/fuchsia.ui.scenic",
"//sdk/fidl/fuchsia.vulkan.loader",
"//sdk/lib/sys/component/cpp/testing:cpp",
"//sdk/lib/syslog/cpp",
"//src/ui/testing/ui_test_manager:test_realms",
]
}
source_set("gfx_pixel_test") {
testonly = true
sources = [
"gfx_integration_tests/pixel_test.cc",
"gfx_integration_tests/pixel_test.h",
]
public_deps = [
":scenic_realm_builder",
"//sdk/fidl/fuchsia.ui.annotation",
"//sdk/fidl/fuchsia.ui.policy",
"//sdk/fidl/fuchsia.ui.scenic",
"//sdk/lib/syslog/cpp",
"//sdk/lib/ui/scenic/cpp",
"//src/lib/testing/loop_fixture",
"//src/ui/testing/views:views",
"//third_party/googletest:gtest",
]
}
executable("gfx_focus_integration_test_bin") {
testonly = true
sources = [ "gfx_integration_tests/gfx_focus_integration_test.cc" ]
deps = [
":common_deps_cts",
"//sdk/fidl/fuchsia.ui.focus",
]
}
fuchsia_component("wrapper_vk_cube") {
testonly = true
manifest = "meta/wrapper_vk_cube.cml"
deps = [ "//third_party/Vulkan-Tools/cube:vkcube-on-scenic" ]
}
fuchsia_test_component("gfx_focus_integration_test") {
component_name = "gfx_focus_integration_test"
manifest = "meta/gfx_focus_integration_test.cml"
deps = [ ":gfx_focus_integration_test_bin" ]
}
executable("gfx_legacy_coordinate_transform_test_bin") {
testonly = true
sources = [ "gfx_integration_tests/gfx_legacy_coordinate_transform_test.cc" ]
deps = [ ":common_deps_cts" ]
}
fuchsia_test_component("gfx_legacy_coordinate_transform_test") {
component_name = "gfx_legacy_coordinate_transform_test"
manifest = "meta/gfx_legacy_coordinate_transform_test.cml"
deps = [ ":gfx_legacy_coordinate_transform_test_bin" ]
}
executable("gfx_legacy_coordinate_transform_test2_bin") {
testonly = true
sources = [ "gfx_integration_tests/gfx_legacy_coordinate_transform_test2.cc" ]
deps = [
":common_deps_cts",
"//sdk//fidl/fuchsia.ui.pointerinjector",
]
}
fuchsia_test_component("gfx_legacy_coordinate_transform_test2") {
component_name = "gfx_legacy_coordinate_transform_test2"
manifest = "meta/gfx_legacy_coordinate_transform_test2.cml"
deps = [ ":gfx_legacy_coordinate_transform_test2_bin" ]
}
executable("gfx_startup_input_test_bin") {
testonly = true
sources = [ "gfx_integration_tests/gfx_startup_input_test.cc" ]
deps = [
":common_deps_cts",
"//sdk/fidl/fuchsia.ui.views",
]
}
fuchsia_test_component("gfx_startup_input_test") {
component_name = "gfx_startup_input_test"
manifest = "meta/gfx_startup_input_test.cml"
deps = [ ":gfx_startup_input_test_bin" ]
}
executable("gfx_touch_integration_test_bin") {
testonly = true
sources = [ "gfx_integration_tests/gfx_touch_integration_test.cc" ]
deps = [
":common_deps_cts",
"//sdk//fidl/fuchsia.ui.pointer",
"//sdk//fidl/fuchsia.ui.pointerinjector",
]
}
fuchsia_test_component("gfx_touch_integration_test") {
component_name = "gfx_touch_integration_test"
manifest = "meta/gfx_touch_integration_test.cml"
deps = [ ":gfx_touch_integration_test_bin" ]
}
executable("gfx_mouse_integration_test_bin") {
testonly = true
sources = [ "gfx_integration_tests/gfx_mouse_integration_test.cc" ]
deps = [
":common_deps_cts",
"//sdk//fidl/fuchsia.ui.pointer",
"//sdk//fidl/fuchsia.ui.pointerinjector",
]
}
fuchsia_test_component("gfx_mouse_integration_test") {
component_name = "gfx_mouse_integration_test"
manifest = "meta/gfx_mouse_integration_test.cml"
deps = [ ":gfx_mouse_integration_test_bin" ]
}
executable("gfx_view_ref_installed_integration_test_bin") {
testonly = true
sources =
[ "gfx_integration_tests/gfx_view_ref_installed_integration_test.cc" ]
deps = [
":common_deps_cts",
"//sdk/fidl/fuchsia.ui.views",
]
}
fuchsia_test_component("gfx_view_ref_installed_integration_test") {
component_name = "gfx_view_ref_installed_integration_test"
manifest = "meta/gfx_view_ref_installed_integration_test.cml"
deps = [ ":gfx_view_ref_installed_integration_test_bin" ]
}
executable("gfx_viewstate_apptest_bin") {
testonly = true
sources = [ "gfx_integration_tests/gfx_viewstate_apptest.cc" ]
deps = [
":common_deps",
":gfx_pixel_test",
":scenic_realm_builder",
"//src/ui/scenic/lib/gfx/tests:testing_deps",
]
}
fuchsia_test_component("gfx_viewstate_apptest") {
component_name = "gfx_viewstate_apptest"
manifest = "meta/gfx_viewstate_app_test.cml"
deps = [
":gfx_viewstate_apptest_bin",
"//src/ui/bin/root_presenter:component_v2",
]
}
executable("gfx_vkcube_test_bin") {
testonly = true
sources = [ "gfx_integration_tests/gfx_vkcube_test.cc" ]
deps = [
":gfx_pixel_test",
":scenic_realm_builder",
"//src/ui/scenic/lib/gfx/tests:gfx_tests_main",
"//src/ui/scenic/lib/gfx/tests:testing_deps",
]
}
fuchsia_test_component("gfx_vkcube_test") {
component_name = "gfx_vkcube_test"
manifest = "meta/gfx_vkcube_test.cml"
deps = [
":gfx_vkcube_test_bin",
":wrapper_vk_cube",
]
}
executable("scenic_pixeltest_bin") {
testonly = true
sources = [ "gfx_integration_tests/scenic_pixeltest.cc" ]
deps = [
":gfx_pixel_test",
":scenic_realm_builder",
"//sdk/fidl/fuchsia.images",
"//sdk/lib/ui/scenic/cpp",
"//src/ui/lib/yuv",
"//src/ui/scenic/lib/gfx/tests:gfx_tests_main",
"//src/ui/scenic/lib/gfx/tests:testing_deps",
]
}
fuchsia_test_component("scenic_pixeltest") {
component_name = "scenic_pixeltest"
manifest = "meta/scenic_pixeltest.cml"
deps = [
":scenic_pixeltest_bin",
"//src/ui/bin/root_presenter:component_v2",
]
}
executable("flatland_touch_integration_test_bin") {
testonly = true
sources = [ "flatland_integration_tests/flatland_touch_integration_test.cc" ]
deps = [
":common_deps_cts",
"//sdk//fidl/fuchsia.ui.composition",
"//sdk//fidl/fuchsia.ui.pointer",
"//sdk//fidl/fuchsia.ui.pointerinjector",
]
}
fuchsia_test_component("flatland_touch_integration_test") {
component_name = "flatland_touch_integration_test"
manifest = "meta/flatland_touch_integration_test.cml"
deps = [ ":flatland_touch_integration_test_bin" ]
}
executable("flatland_focus_integration_test_bin") {
testonly = true
sources = [ "flatland_integration_tests/flatland_focus_integration_test.cc" ]
deps = [
":common_deps_cts",
"//sdk//fidl/fuchsia.ui.composition",
"//sdk/fidl/fuchsia.ui.focus",
]
}
fuchsia_test_component("flatland_focus_integration_test") {
component_name = "flatland_focus_integration_test"
manifest = "meta/flatland_focus_integration_test.cml"
deps = [ ":flatland_focus_integration_test_bin" ]
}
executable("observer_registry_integration_test_bin") {
testonly = true
sources =
[ "observer_integration_tests/observer_registry_integration_test.cc" ]
deps = [
":common_deps_cts",
"//sdk//fidl/fuchsia.ui.composition",
"//sdk//fidl/fuchsia.ui.focus",
"//sdk//fidl/fuchsia.ui.observation.geometry",
"//sdk//fidl/fuchsia.ui.observation.test",
]
}
fuchsia_test_component("observer_registry_integration_test") {
component_name = "observer_registry_integration_test"
manifest = "meta/observer_registry_integration_test.cml"
deps = [ ":observer_registry_integration_test_bin" ]
}
executable("screen_capture_integration_test_bin") {
testonly = true
sources = [ "flatland_integration_tests/screen_capture_integration_test.cc" ]
deps = [
":common_deps",
"//sdk//fidl/fuchsia.ui.composition",
"//src/ui/scenic/lib/allocation:allocation",
"//src/ui/scenic/lib/screen_capture:screen_capture",
"//src/ui/scenic/lib/utils:utils",
"//zircon/system/ulib/fbl",
]
}
fuchsia_test_component("screen_capture_integration_test") {
component_name = "screen_capture_integration_test"
manifest = "meta/screen_capture_integration_test.cml"
deps = [ ":screen_capture_integration_test_bin" ]
}
executable("singleton_display_integration_test_bin") {
testonly = true
sources = [ "singleton_display_integration_test.cc" ]
deps = [
":common_deps_cts",
":scenic_realm_builder",
"//sdk//fidl/fuchsia.ui.display.singleton",
"//src/ui/scenic/lib/utils:utils",
"//zircon/system/ulib/fbl",
]
}
fuchsia_test_component("singleton_display_integration_test") {
component_name = "singleton_display_integration_test"
manifest = "meta/singleton_display_integration_test.cml"
deps = [ ":singleton_display_integration_test_bin" ]
}
executable("flatland_mouse_integration_test_bin") {
testonly = true
sources = [ "flatland_integration_tests/flatland_mouse_integration_test.cc" ]
deps = [
":common_deps_cts",
"//sdk//fidl/fuchsia.input.report",
"//sdk//fidl/fuchsia.ui.composition",
"//sdk//fidl/fuchsia.ui.pointer",
"//sdk//fidl/fuchsia.ui.pointerinjector",
"//src/ui/scenic/lib/utils",
]
}
fuchsia_test_component("flatland_mouse_integration_test") {
component_name = "flatland_mouse_integration_test"
manifest = "meta/flatland_mouse_integration_test.cml"
deps = [ ":flatland_mouse_integration_test_bin" ]
}
fuchsia_test_package("gfx_integration_tests") {
test_components = [
":gfx_focus_integration_test",
":gfx_legacy_coordinate_transform_test",
":gfx_legacy_coordinate_transform_test2",
":gfx_mouse_integration_test",
":gfx_startup_input_test",
":gfx_touch_integration_test",
":gfx_view_ref_installed_integration_test",
":gfx_viewstate_apptest",
":scenic_pixeltest",
":gfx_vkcube_test",
]
test_specs = {
environments = [ aemu_env ] + magma_libvulkan_hardware_envs
log_settings = {
max_severity = "ERROR"
}
}
}
fuchsia_test_package("flatland_integration_tests") {
test_components = [
":flatland_touch_integration_test",
":flatland_focus_integration_test",
":flatland_mouse_integration_test",
]
test_specs = {
environments = [ aemu_env ] + magma_libvulkan_hardware_envs
}
}
fuchsia_test_package("hardware_env_tests_fxb91950") {
test_components = [ ":screen_capture_integration_test" ]
test_specs = {
# TODO(fxbug.dev/91950): Should have the same environments as "flatland_integration_tests"
# above, but screen capture does not work on aemu, so we skip it for now.
environments = magma_libvulkan_hardware_envs
}
}
fuchsia_test_package("observer_integration_tests") {
test_components = [ ":observer_registry_integration_test" ]
test_specs = {
environments = [ aemu_env ] + magma_libvulkan_hardware_envs
}
}
fuchsia_test_package("display_integration_tests") {
test_components = [ ":singleton_display_integration_test" ]
test_specs = {
environments = [ aemu_env ] + magma_libvulkan_hardware_envs
}
}