| # Copyright 2019 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/environments.gni") |
| import("//src/graphics/lib/magma/gnbuild/magma.gni") |
| import("//src/lib/vulkan/layers.gni") |
| import("//src/lib/vulkan/vulkan.gni") |
| import("//src/ui/lib/escher/build_args.gni") |
| import("//src/ui/scenic/build_args.gni") |
| import("//src/ui/scenic/lib/gfx/build_args.gni") |
| |
| group("scenic") { |
| public_deps = [ ":scenic_pkg" ] |
| } |
| |
| config("flatland_config") { |
| defines = [] |
| if (use_flatland_by_default) { |
| defines += [ "USE_FLATLAND_BY_DEFAULT" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| |
| public_deps = [ |
| ":allocation_unittests", |
| ":display_unittests", |
| ":flatland_buffers_unittests", |
| ":flatland_display_compositor_pixeltests", |
| ":flatland_display_compositor_pixeltests_with_fake_display", |
| ":flatland_display_compositor_smoketests", |
| ":flatland_engine_unittests", |
| ":flatland_renderer_unittests", |
| ":flatland_unittests", |
| ":focus_unittests", |
| ":fuzzers", |
| ":geometry_provider_unittests", |
| ":gfx_apptests", |
| ":gfx_swapchain_tests", |
| ":gfx_unittests", |
| ":gfx_util_unittests", |
| ":input_unittests", |
| ":scenic_unittests", |
| ":scenic_util_tests", |
| ":scenic_utils_unittests", |
| ":scheduling_unittests", |
| ":screen_capture2_unittests", |
| ":screen_capture_unittests", |
| ":screenshot_unittests", |
| ":view_tree_unittests", |
| "tests", |
| ] |
| } |
| |
| group("fuzzers") { |
| testonly = true |
| public_deps = [ "lib/scheduling/tests/fuzzers" ] |
| } |
| |
| scenic_test_deps = [ "//src/lib/vulkan:vulkan_validation_layers" ] |
| if (escher_use_runtime_glsl) { |
| scenic_test_deps += [ "//src/ui/lib/escher/shaders:escher_shaders_resources" ] |
| } else { |
| scenic_test_deps += |
| [ "//src/ui/lib/escher/shaders:escher_shaders_spirv_resources" ] |
| } |
| |
| fuchsia_unittest_package("allocation_unittests") { |
| manifest = "meta/allocation_unittests.cml" |
| deps = [ "lib/allocation/tests:unittests" ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_unittest_package("display_unittests") { |
| deps = [ "lib/display/tests:unittests" ] + scenic_test_deps |
| } |
| |
| fuchsia_unittest_package("flatland_unittests") { |
| manifest = "meta/flatland_unittests.cml" |
| deps = [ "lib/flatland/tests:unittests" ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_unittest_package("flatland_buffers_unittests") { |
| manifest = "meta/flatland_buffers_unittests.cml" |
| deps = [ "lib/flatland/buffers/tests:unittests" ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_unittest_package("flatland_display_compositor_pixeltests") { |
| manifest = "meta/flatland_display_compositor_pixeltests.cml" |
| deps = [ |
| "lib/flatland/engine/tests/pixeltests:pixeltests_with_real_display", |
| "//src/graphics/display/testing/coordinator-provider:display-coordinator-provider-component", |
| ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| |
| # Ensures that only devices that have access |
| # to display controller image capture features |
| # can run this test suite. |
| environments = [ |
| astro_env, |
| sherlock_env, |
| vim3_env, |
| ] |
| } |
| } |
| |
| fuchsia_unittest_package( |
| "flatland_display_compositor_pixeltests_with_fake_display") { |
| manifest = "meta/flatland_display_compositor_pixeltests_with_fake_display.cml" |
| deps = [ |
| "lib/flatland/engine/tests/pixeltests:pixeltests_with_fake_display", |
| "//src/graphics/display/testing/coordinator-provider:fake-display-coordinator-provider-component", |
| ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| |
| # Force these tests to run on NUC + basic_envs in CQ. Do not remove. |
| environments = [ nuc_env ] + basic_envs |
| } |
| } |
| |
| fuchsia_unittest_package("flatland_display_compositor_smoketests") { |
| manifest = "meta/flatland_display_compositor_smoketests.cml" |
| deps = [ |
| "lib/flatland/engine/tests/smoketests:smoketests_with_fake_display", |
| "//src/graphics/display/testing/coordinator-provider:fake-display-coordinator-provider-component", |
| ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| |
| environments = [ aemu_env ] + basic_envs |
| } |
| } |
| |
| fuchsia_unittest_package("flatland_engine_unittests") { |
| manifest = "meta/flatland_engine_unittests.cml" |
| deps = [ |
| "lib/flatland/engine/tests:unittests", |
| "//src/graphics/display/testing/coordinator-provider:fake-display-coordinator-provider-component", |
| ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_unittest_package("flatland_renderer_unittests") { |
| manifest = "meta/flatland_renderer_unittests.cml" |
| deps = [ |
| "lib/flatland/renderer/tests:unittests", |
| "//src/graphics/display/testing/coordinator-provider:fake-display-coordinator-provider-component", |
| ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| environments = basic_envs + magma_libvulkan_hardware_envs |
| } |
| } |
| |
| fuchsia_unittest_package("gfx_apptests") { |
| manifest = "meta/gfx_apptests.cml" |
| deps = [ "lib/gfx/tests:apptests" ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_unittest_package("gfx_swapchain_tests") { |
| manifest = "meta/gfx_swapchain_tests.cml" |
| deps = [ |
| "lib/gfx/tests:swapchain_tests", |
| "//src/graphics/display/testing/coordinator-provider:fake-display-coordinator-provider-component", |
| ] + scenic_test_deps |
| test_specs = { |
| environments = vulkan_envs |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_unittest_package("gfx_unittests") { |
| manifest = "meta/gfx_unittests.cml" |
| deps = [ "lib/gfx/tests:unittests" ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "FATAL" |
| } |
| environments = basic_envs + magma_libvulkan_hardware_envs |
| } |
| } |
| |
| fuchsia_unittest_package("gfx_util_unittests") { |
| deps = [ "lib/gfx/util/tests:unittests" ] + scenic_test_deps |
| } |
| |
| fuchsia_unittest_package("focus_unittests") { |
| deps = [ "lib/focus/tests:unittests" ] |
| } |
| |
| fuchsia_unittest_package("input_unittests") { |
| manifest = "meta/input_unittests.cml" |
| deps = [ "lib/input/tests:unittests" ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_unittest_package("scenic_unittests") { |
| manifest = "meta/scenic_unittests.cml" |
| deps = [ |
| "lib/scenic/tests:unittests", |
| "//src/lib/fake-clock/svc", |
| ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_unittest_package("scenic_util_tests") { |
| manifest = "meta/scenic_util_tests.cml" |
| deps = [ "lib/scenic/util/tests:unittests" ] |
| } |
| |
| fuchsia_unittest_package("scenic_utils_unittests") { |
| manifest = "meta/scenic_utils_unittests.cml" |
| deps = [ "lib/utils/tests:unittests" ] |
| } |
| |
| fuchsia_unittest_package("scheduling_unittests") { |
| deps = [ "lib/scheduling/tests:unittests" ] + scenic_test_deps |
| } |
| |
| fuchsia_unittest_package("screenshot_unittests") { |
| manifest = "meta/screenshot_unittests.cml" |
| deps = [ "lib/screenshot/tests:unittests" ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_unittest_package("screen_capture_unittests") { |
| manifest = "meta/screen_capture_unittests.cml" |
| deps = [ "lib/screen_capture/tests:unittests" ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_unittest_package("screen_capture2_unittests") { |
| manifest = "meta/screen_capture2_unittests.cml" |
| deps = [ "lib/screen_capture2/tests:unittests" ] + scenic_test_deps |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_unittest_package("geometry_provider_unittests") { |
| deps = [ "lib/view_tree/tests:geometry_provider_test_bin" ] |
| } |
| |
| fuchsia_unittest_package("view_tree_unittests") { |
| deps = [ "lib/view_tree/tests:view_tree_test_bin" ] |
| } |
| |
| fuchsia_component_manifest("scenic_manifest") { |
| component_name = "scenic" |
| manifest = "bin/meta/scenic.cml" |
| } |
| |
| fuchsia_component_manifest("scenic_with_supplied_display_provider_manifest") { |
| component_name = "scenic" |
| manifest = "bin/meta/scenic_with_supplied_display_provider.cml" |
| } |
| |
| fuchsia_component("component_v2") { |
| cm_label = ":scenic_manifest" |
| deps = [ "bin" ] |
| |
| if (escher_use_runtime_glsl) { |
| deps += [ "//src/ui/lib/escher/shaders:escher_shaders_resources" ] |
| } else { |
| deps += [ "//src/ui/lib/escher/shaders:escher_shaders_spirv_resources" ] |
| } |
| |
| if (scenic_enable_vulkan_validation) { |
| deps += [ "//src/lib/vulkan:vulkan_validation_layers" ] |
| } |
| } |
| |
| # Scenic V2 component where |fuchsia.hardware.display.Provider| is a required |
| # capability. This should be used in test environments where a fake hardware |
| # display controller provider is provided. |
| fuchsia_component("component_v2_with_supplied_display_provider") { |
| cm_label = ":scenic_with_supplied_display_provider_manifest" |
| deps = [ "bin" ] |
| |
| if (escher_use_runtime_glsl) { |
| deps += [ "//src/ui/lib/escher/shaders:escher_shaders_resources" ] |
| } else { |
| deps += [ "//src/ui/lib/escher/shaders:escher_shaders_spirv_resources" ] |
| } |
| |
| if (scenic_enable_vulkan_validation) { |
| deps += [ "//src/lib/vulkan:vulkan_validation_layers" ] |
| } |
| } |
| |
| fuchsia_structured_config_cpp_elf_lib("scenic_structured_config") { |
| cm_label = ":scenic_manifest" |
| } |
| |
| fuchsia_structured_config_values("config_for_test") { |
| cm_label = ":scenic_manifest" |
| values_source = "config/default_for_test.json5" |
| } |
| |
| fuchsia_structured_config_values( |
| "config_with_supplied_display_provider_for_test") { |
| cm_label = ":scenic_with_supplied_display_provider_manifest" |
| values_source = "config/default_for_test.json5" |
| } |
| |
| fuchsia_package("scenic_pkg") { |
| package_name = "scenic" |
| deps = [ |
| ":component_v2", |
| ":config_for_test", |
| ] |
| } |
| |
| # TODO(fxbug.dev/106573): Remove test-only target when |
| # default config values are available. |
| group("component_v2_with_supplied_display_provider_for_test") { |
| deps = [ |
| ":component_v2_with_supplied_display_provider", |
| ":config_with_supplied_display_provider_for_test", |
| ] |
| } |
| |
| group("frame-scheduler-min-predicted-frame-duration-in-us--15000") { |
| public_deps = [ ":frame_scheduler_min_predicted_frame_duration_in_us__15000" ] |
| } |
| |
| config_data("frame_scheduler_min_predicted_frame_duration_in_us__15000") { |
| for_pkg = "scenic" |
| sources = [ rebase_path( |
| "data/frame_scheduler_min_predicted_frame_duration_in_us__15000") ] |
| outputs = [ "scenic_config" ] |
| } |