| # 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/package.gni") | |
| import("//build/test/test_package.gni") | |
| import("//build/testing/environments.gni") | |
| import("//src/graphics/lib/magma/gnbuild/magma.gni") | |
| import("//src/lib/vulkan/layers.gni") | |
| import("//src/ui/lib/escher/build_args.gni") | |
| import("//src/ui/lib/escher/shaders/shaders.gni") | |
| # Runtime is the set of package dependencies typically desired for the | |
| # construction of a product that includes scenic, and is included in | |
| # many such products. | |
| group("runtime") { | |
| deps = [ | |
| ":scenic", | |
| "//garnet/bin/sysmem_connector", | |
| "//src/graphics/bin/vulkan_loader", | |
| "//src/sys/activity", | |
| "//src/ui/bin/ime:ime_service", | |
| "//src/ui/bin/root_presenter", | |
| "//src/ui/bin/root_presenter:configs", | |
| ] | |
| } | |
| group("scenic") { | |
| public_deps = [ ":scenic_pkg" ] | |
| } | |
| group("tests") { | |
| testonly = true | |
| public_deps = [ | |
| ":fuzzers", | |
| ":scenic_tests", | |
| "lib/gfx/tests", | |
| "lib/gfx/tests:mock_pose_buffer_provider", | |
| "lib/gfx/tests/rotated_square_test", | |
| "lib/scenic/util/tests:tests", | |
| "lib/utils:tests", | |
| # These are included in //src/ui/bin:tests, but I don't see that included anywhere. | |
| # If these tests fail, then other Scenic tests are likely to fail, so we want to guarantee that | |
| # they are always run whenever Scenic tests are. | |
| "//src/ui/bin/hardware_display_controller_provider:tests", | |
| ] | |
| } | |
| group("fuzzers") { | |
| testonly = true | |
| public_deps = [ | |
| "lib/input/tests/fuzzers", | |
| "lib/scheduling/tests/fuzzers", | |
| ] | |
| } | |
| test_package("scenic_tests") { | |
| deps = [ | |
| "lib/display/tests", | |
| "lib/flatland/buffers/tests", | |
| "lib/flatland/engine/tests", | |
| "lib/flatland/renderer/tests", | |
| "lib/flatland/tests", | |
| "lib/gfx/tests", | |
| "lib/gfx/util/tests", | |
| "lib/input/tests", | |
| "lib/scenic/tests", | |
| "lib/scheduling/tests", | |
| ] | |
| tests = [ | |
| { | |
| name = "display_unittests" | |
| environments = basic_envs | |
| }, | |
| { | |
| name = "flatland_unittests" | |
| environments = basic_envs | |
| }, | |
| { | |
| log_settings = { | |
| max_severity = "ERROR" | |
| } | |
| name = "flatland_buffers_unittests" | |
| environments = basic_envs | |
| }, | |
| { | |
| log_settings = { | |
| max_severity = "ERROR" | |
| } | |
| name = "flatland_engine_unittests" | |
| environments = basic_envs | |
| }, | |
| { | |
| name = "flatland_renderer_unittests" | |
| environments = basic_envs + magma_libvulkan_hardware_envs | |
| }, | |
| { | |
| name = "gfx_apptests" | |
| environments = basic_envs | |
| }, | |
| { | |
| name = "gfx_pixeltests" | |
| environments = [ aemu_env ] + magma_libvulkan_hardware_envs | |
| }, | |
| { | |
| name = "gfx_swapchain_tests" | |
| environments = [ aemu_env ] + magma_libvulkan_hardware_envs | |
| }, | |
| { | |
| name = "gfx_unittests" | |
| environments = basic_envs + magma_libvulkan_hardware_envs | |
| }, | |
| { | |
| name = "gfx_util_unittests" | |
| environments = basic_envs | |
| }, | |
| { | |
| name = "gfx_viewstate_apptests" | |
| environments = [ aemu_env ] + magma_libvulkan_hardware_envs | |
| }, | |
| { | |
| name = "input_unittests" | |
| environments = basic_envs | |
| }, | |
| { | |
| name = "scenic_unittests" | |
| environments = basic_envs | |
| }, | |
| { | |
| name = "scheduling_unittests" | |
| environments = basic_envs | |
| }, | |
| ] | |
| public_deps = vulkan_validation_layers.public_deps | |
| loadable_modules = vulkan_validation_layers.loadable_modules | |
| resources = vulkan_validation_layers.resources | |
| if (escher_use_runtime_glsl) { | |
| resources += escher_shaders_resources | |
| } else { | |
| resources += escher_shaders_spirv_resources | |
| } | |
| } | |
| declare_args() { | |
| # Include the vulkan validation layers in scenic. | |
| scenic_enable_vulkan_validation = is_debug | |
| } | |
| # For migration purposes only. To be moved to src/ui/scenic/bin:scenic | |
| package("scenic_pkg") { | |
| package_name = "scenic" | |
| deps = [ "bin" ] | |
| binaries = [ | |
| { | |
| name = "scenic" | |
| }, | |
| ] | |
| meta = [ | |
| { | |
| path = rebase_path("bin/meta/scenic.cmx") | |
| dest = "scenic.cmx" | |
| }, | |
| ] | |
| resources = [] | |
| if (escher_use_runtime_glsl) { | |
| resources += escher_shaders_resources | |
| } else { | |
| resources += escher_shaders_spirv_resources | |
| } | |
| # If configured, include the vulkan validation layers. | |
| if (scenic_enable_vulkan_validation) { | |
| loadable_modules = vulkan_validation_layers.loadable_modules | |
| public_deps = vulkan_validation_layers.public_deps | |
| resources += vulkan_validation_layers.resources | |
| } | |
| } |