| # 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/lib/vulkan/vulkan.gni") |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ |
| ":display_integration_tests", |
| ":flatland_cpu_renderer_integration_test", |
| ":flatland_integration_tests", |
| ":flatland_null_renderer_integration_test", |
| ":flatland_pixeltest_yuv", |
| ":flatland_protected_memory_integration_test", |
| ":observer_integration_tests", |
| ] |
| } |
| |
| config("vulkan_no_nodiscard") { |
| defines = [ "VULKAN_HPP_NO_NODISCARD_WARNINGS" ] |
| } |
| |
| source_set("common_deps") { |
| testonly = true |
| sources = [ |
| "utils/blocking_present.cc", |
| "utils/blocking_present.h", |
| "utils/logging_event_loop.cc", |
| "utils/logging_event_loop.h", |
| "utils/utils.cc", |
| "utils/utils.h", |
| ] |
| public_deps = [ |
| ":scenic_realm_builder", |
| "//sdk/lib/async-loop-testing/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/lib/fxl/test:gtest_main", |
| "//src/ui/testing/util:screenshot_helper", |
| "//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/blocking_present.cc", |
| "utils/blocking_present.h", |
| "utils/logging_event_loop.cc", |
| "utils/logging_event_loop.h", |
| "utils/utils.cc", |
| "utils/utils.h", |
| ] |
| public_deps = [ |
| ":scenic_realm_builder", |
| "//sdk/lib/async-loop-testing/cpp", |
| "//sdk/lib/syslog/cpp", |
| "//sdk/lib/ui/scenic/cpp", |
| "//src/ui/testing/util:screenshot_helper", |
| "//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:fuchsia.logger_hlcpp", |
| "//sdk/fidl/fuchsia.media:fuchsia.media_hlcpp", |
| "//sdk/fidl/fuchsia.scheduler:fuchsia.scheduler_hlcpp", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_hlcpp", |
| "//sdk/fidl/fuchsia.tracing.provider:fuchsia.tracing.provider_hlcpp", |
| "//sdk/fidl/fuchsia.ui.app:fuchsia.ui.app_hlcpp", |
| "//sdk/fidl/fuchsia.ui.scenic:fuchsia.ui.scenic_hlcpp", |
| "//sdk/fidl/fuchsia.vulkan.loader:fuchsia.vulkan.loader_hlcpp", |
| "//sdk/lib/sys/component/cpp/testing:cpp", |
| "//sdk/lib/syslog/cpp", |
| "//src/ui/testing/ui_test_realm:test_realms", |
| ] |
| } |
| |
| source_set("screen_capture_utils") { |
| testonly = true |
| sources = [ |
| "utils/screen_capture_utils.cc", |
| "utils/screen_capture_utils.h", |
| ] |
| public_deps = [ |
| ":common_deps", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp", |
| "//src/ui/scenic/lib/allocation:allocation", |
| "//src/ui/scenic/lib/flatland/engine", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| executable("flatland_allocation_test_bin") { |
| testonly = true |
| sources = [ "flatland_integration_tests/flatland_allocation_test.cc" ] |
| deps = [ |
| ":common_deps_cts", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp", |
| "//src/ui/scenic/lib/allocation:allocation", |
| "//src/ui/scenic/lib/utils:utils", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| fuchsia_test_component("flatland_allocation_test") { |
| component_name = "flatland_allocation_test" |
| manifest = "meta/flatland_allocation_test.cml" |
| deps = [ ":flatland_allocation_test_bin" ] |
| test_type = "vulkan" |
| } |
| |
| executable("flatland_touch_integration_test_bin") { |
| testonly = true |
| sources = [ |
| "flatland_integration_tests/flatland_touch_integration_test.cc", |
| "flatland_integration_tests/flatland_touch_local_hit_integration_test.cc", |
| ] |
| deps = [ |
| ":common_deps_cts", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp", |
| "//sdk/fidl/fuchsia.ui.pointer:fuchsia.ui.pointer_hlcpp", |
| "//sdk/fidl/fuchsia.ui.pointer.augment:fuchsia.ui.pointer.augment_hlcpp", |
| "//sdk/fidl/fuchsia.ui.pointerinjector:fuchsia.ui.pointerinjector_hlcpp", |
| ] |
| } |
| |
| 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" ] |
| test_type = "vulkan" |
| } |
| |
| 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:fuchsia.ui.composition_hlcpp", |
| "//sdk/fidl/fuchsia.ui.focus:fuchsia.ui.focus_hlcpp", |
| ] |
| } |
| |
| 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" ] |
| test_type = "vulkan" |
| } |
| |
| executable("flatland_view_ref_installed_integration_test_bin") { |
| testonly = true |
| sources = [ "flatland_integration_tests/flatland_view_ref_installed_integration_test.cc" ] |
| deps = [ |
| ":common_deps_cts", |
| "//sdk/fidl/fuchsia.ui.views:fuchsia.ui.views_hlcpp", |
| ] |
| } |
| |
| fuchsia_test_component("flatland_view_ref_installed_integration_test") { |
| component_name = "flatland_view_ref_installed_integration_test" |
| manifest = "meta/flatland_view_ref_installed_integration_test.cml" |
| deps = [ ":flatland_view_ref_installed_integration_test_bin" ] |
| test_type = "vulkan" |
| } |
| |
| executable("flatland_view_integration_test_bin") { |
| testonly = true |
| sources = [ "flatland_integration_tests/flatland_view_integration_test.cc" ] |
| deps = [ |
| ":common_deps_cts", |
| "//sdk/fidl/fuchsia.ui.display.singleton:fuchsia.ui.display.singleton_hlcpp", |
| "//sdk/fidl/fuchsia.ui.views:fuchsia.ui.views_hlcpp", |
| ] |
| } |
| |
| fuchsia_test_component("flatland_view_integration_test") { |
| component_name = "flatland_view_integration_test" |
| manifest = "meta/flatland_view_integration_test.cml" |
| deps = [ ":flatland_view_integration_test_bin" ] |
| test_type = "vulkan" |
| } |
| |
| executable("cpu_renderer_integration_test_bin") { |
| testonly = true |
| sources = [ "flatland_integration_tests/cpu_renderer_integration_test.cc" ] |
| deps = [ |
| ":common_deps", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_hlcpp", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp", |
| "//src/ui/scenic/lib/allocation:allocation", |
| "//src/ui/scenic/lib/flatland/buffers", |
| "//src/ui/scenic/lib/utils:utils", |
| ] |
| } |
| |
| fuchsia_test_component("cpu_renderer_integration_test") { |
| component_name = "cpu_renderer_integration_test" |
| manifest = "meta/cpu_renderer_integration_test.cml" |
| deps = [ ":cpu_renderer_integration_test_bin" ] |
| test_type = "system" |
| } |
| |
| executable("null_renderer_integration_test_bin") { |
| testonly = true |
| sources = [ "flatland_integration_tests/null_renderer_integration_test.cc" ] |
| deps = [ |
| ":common_deps", |
| "//sdk/fidl/fuchsia.sysmem:fuchsia.sysmem_hlcpp", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp", |
| "//src/ui/scenic/lib/allocation:allocation", |
| "//src/ui/scenic/lib/utils:utils", |
| ] |
| } |
| |
| fuchsia_test_component("null_renderer_integration_test") { |
| component_name = "null_renderer_integration_test" |
| manifest = "meta/null_renderer_integration_test.cml" |
| deps = [ ":null_renderer_integration_test_bin" ] |
| test_type = "system" |
| } |
| |
| 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:fuchsia.ui.composition_hlcpp", |
| "//sdk/fidl/fuchsia.ui.focus:fuchsia.ui.focus_hlcpp", |
| "//sdk/fidl/fuchsia.ui.observation.geometry:fuchsia.ui.observation.geometry_hlcpp", |
| "//sdk/fidl/fuchsia.ui.observation.test:fuchsia.ui.observation.test_hlcpp", |
| ] |
| } |
| |
| 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" ] |
| test_type = "vulkan" |
| } |
| |
| executable("scoped_observer_registry_integration_test_bin") { |
| testonly = true |
| sources = [ |
| "observer_integration_tests/scoped_observer_registry_integration_test.cc", |
| ] |
| deps = [ |
| ":common_deps_cts", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp", |
| "//sdk/fidl/fuchsia.ui.focus:fuchsia.ui.focus_hlcpp", |
| "//sdk/fidl/fuchsia.ui.observation.geometry:fuchsia.ui.observation.geometry_hlcpp", |
| "//sdk/fidl/fuchsia.ui.observation.scope:fuchsia.ui.observation.scope_hlcpp", |
| ] |
| } |
| |
| fuchsia_test_component("scoped_observer_registry_integration_test") { |
| component_name = "scoped_observer_registry_integration_test" |
| manifest = "meta/scoped_observer_registry_integration_test.cml" |
| deps = [ ":scoped_observer_registry_integration_test_bin" ] |
| test_type = "vulkan" |
| } |
| |
| executable("protected_memory_integration_test_bin") { |
| testonly = true |
| sources = |
| [ "flatland_integration_tests/protected_memory_integration_test.cc" ] |
| deps = [ |
| ":common_deps", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp", |
| "//src/ui/scenic/lib/allocation:allocation", |
| "//src/ui/scenic/lib/utils:utils", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| fuchsia_test_component("protected_memory_integration_test") { |
| component_name = "protected_memory_integration_test" |
| manifest = "meta/protected_memory_integration_test.cml" |
| deps = [ ":protected_memory_integration_test_bin" ] |
| test_type = "vulkan" |
| } |
| |
| executable("screen_capture_integration_test_bin") { |
| testonly = true |
| sources = [ "flatland_integration_tests/screen_capture_integration_test.cc" ] |
| deps = [ |
| ":common_deps", |
| ":screen_capture_utils", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp", |
| "//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" ] |
| test_type = "vulkan" |
| } |
| |
| executable("screen_capture2_integration_test_bin") { |
| testonly = true |
| sources = [ "flatland_integration_tests/screen_capture2_integration_test.cc" ] |
| deps = [ |
| ":common_deps", |
| ":screen_capture_utils", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp", |
| "//sdk/fidl/fuchsia.ui.composition.internal:fuchsia.ui.composition.internal_hlcpp", |
| "//sdk/fidl/fuchsia.vulkan.loader:fuchsia.vulkan.loader_hlcpp", |
| "//src/ui/lib/escher", |
| "//src/ui/scenic/lib/allocation:allocation", |
| "//src/ui/scenic/lib/flatland/engine", |
| "//src/ui/scenic/lib/screen_capture2:screen_capture2", |
| "//src/ui/scenic/lib/utils:utils", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| fuchsia_test_component("screen_capture2_integration_test") { |
| component_name = "screen_capture2_integration_test" |
| manifest = "meta/screen_capture2_integration_test.cml" |
| deps = [ ":screen_capture2_integration_test_bin" ] |
| test_type = "vulkan" |
| } |
| |
| executable("display_ownership_integration_test_bin") { |
| testonly = true |
| sources = [ "display_ownership_integration_test.cc" ] |
| deps = [ |
| ":common_deps_cts", |
| ":scenic_realm_builder", |
| "//sdk/fidl/fuchsia.ui.composition.internal:fuchsia.ui.composition.internal_hlcpp", |
| "//src/ui/scenic/lib/utils:utils", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| fuchsia_test_component("display_ownership_integration_test") { |
| component_name = "display_ownership_integration_test" |
| manifest = "meta/display_ownership_integration_test.cml" |
| deps = [ ":display_ownership_integration_test_bin" ] |
| test_type = "vulkan" |
| } |
| |
| 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.composition:fuchsia.ui.composition_hlcpp", |
| "//sdk/fidl/fuchsia.ui.display.singleton:fuchsia.ui.display.singleton_hlcpp", |
| "//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" ] |
| test_type = "vulkan" |
| } |
| |
| 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:fuchsia.input.report_hlcpp", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp", |
| "//sdk/fidl/fuchsia.ui.pointer:fuchsia.ui.pointer_hlcpp", |
| "//sdk/fidl/fuchsia.ui.pointerinjector:fuchsia.ui.pointerinjector_hlcpp", |
| "//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" ] |
| test_type = "vulkan" |
| } |
| |
| executable("flatland_pixeltest_bin") { |
| testonly = true |
| sources = [ "flatland_integration_tests/flatland_pixeltest.cc" ] |
| deps = [ |
| ":common_deps_cts", |
| "//sdk/fidl/fuchsia.ui.composition:fuchsia.ui.composition_hlcpp", |
| "//sdk/fidl/fuchsia.ui.compression.internal:fuchsia.ui.compression.internal_cpp", |
| "//sdk/fidl/fuchsia.ui.display.singleton:fuchsia.ui.display.singleton_hlcpp", |
| "//src/lib/testing/loop_fixture", |
| "//src/ui/scenic/lib/allocation:allocation", |
| "//src/ui/scenic/lib/utils", |
| "//src/ui/scenic/lib/utils:utils", |
| "//src/ui/testing/util:screenshot_helper", |
| "//zircon/system/ulib/fbl", |
| ] |
| } |
| |
| fuchsia_test_component("flatland_pixeltest_flip_and_orientation") { |
| component_name = "flatland_pixeltest_flip_and_orientation" |
| manifest = "meta/flatland_pixeltest_flip_and_orientation.cml" |
| deps = [ ":flatland_pixeltest_bin" ] |
| test_type = "vulkan" |
| } |
| |
| fuchsia_test_component("flatland_pixeltest_general") { |
| component_name = "flatland_pixeltest_general" |
| manifest = "meta/flatland_pixeltest_general.cml" |
| deps = [ ":flatland_pixeltest_bin" ] |
| test_type = "vulkan" |
| } |
| |
| fuchsia_test_package("flatland_integration_tests") { |
| test_components = [ |
| ":flatland_allocation_test", |
| ":flatland_focus_integration_test", |
| ":flatland_mouse_integration_test", |
| ":flatland_pixeltest_flip_and_orientation", |
| ":flatland_pixeltest_general", |
| ":flatland_touch_integration_test", |
| ":flatland_view_ref_installed_integration_test", |
| ":flatland_view_integration_test", |
| ":screen_capture_integration_test", |
| ":screen_capture2_integration_test", |
| ] |
| test_specs = { |
| environments = vulkan_envs |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_test_component("pixeltest_yuv") { |
| component_name = "flatland_pixeltest_yuv" |
| manifest = "meta/flatland_pixeltest_yuv.cml" |
| deps = [ ":flatland_pixeltest_bin" ] |
| test_type = "vulkan" |
| } |
| |
| fuchsia_test_package("flatland_pixeltest_yuv") { |
| test_components = [ ":pixeltest_yuv" ] |
| test_specs = { |
| # TODO(https://fxbug.dev/42137913): Skip this test for AEMU as YUV Sysmem images are not supported yet. |
| environments = magma_libvulkan_hardware_envs |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_test_package("flatland_cpu_renderer_integration_test") { |
| test_components = [ ":cpu_renderer_integration_test" ] |
| |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_test_package("flatland_null_renderer_integration_test") { |
| test_components = [ ":null_renderer_integration_test" ] |
| |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_test_package("flatland_protected_memory_integration_test") { |
| test_components = [ ":protected_memory_integration_test" ] |
| |
| test_specs = { |
| environments = [ |
| astro_env, |
| sherlock_env, |
| nelson_env, |
| ] |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_test_package("observer_integration_tests") { |
| test_components = [ |
| ":observer_registry_integration_test", |
| ":scoped_observer_registry_integration_test", |
| ] |
| test_specs = { |
| environments = vulkan_envs |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_test_package("display_integration_tests") { |
| test_components = [ |
| ":singleton_display_integration_test", |
| ":display_ownership_integration_test", |
| ] |
| test_specs = { |
| environments = vulkan_envs |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |