blob: 970eba5cefcf588bf251a7821da444baee6ce226 [file] [log] [blame]
# 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/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 = [
":configs",
":scenic_pkg",
]
}
group("configs") {
deps = [ ":scenic_config" ]
}
config_data("scenic_config") {
for_pkg = "sysmgr"
outputs = [ "scenic.config" ]
sources = [ "services.config" ]
}
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",
":scheduling_unittests",
":screen_capture_unittests",
":view_tree_unittests",
"tests",
]
}
group("fuzzers") {
testonly = true
public_deps = [
"lib/input/tests/fuzzers",
"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/ui/bin/hardware_display_controller_provider:hardware-display-controller-provider-cmv2-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/ui/bin/hardware_display_controller_provider:fake-hardware-display-controller-provider-cmv2-component",
] + scenic_test_deps
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
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/ui/bin/hardware_display_controller_provider:fake-hardware-display-controller-provider-cmv2-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/ui/bin/hardware_display_controller_provider:fake-hardware-display-controller-provider-cmv2-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/ui/bin/hardware_display_controller_provider:fake-hardware-display-controller-provider-cmv2-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/ui/bin/hardware_display_controller_provider:fake-hardware-display-controller-provider-cmv2-component",
] + scenic_test_deps
test_specs = {
environments = [ aemu_env ] + magma_libvulkan_hardware_envs
}
}
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:svc_v2",
] + 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("scheduling_unittests") {
deps = [ "lib/scheduling/tests:unittests" ] + scenic_test_deps
}
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("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" ]
}
# For migration purposes only. To be moved to src/ui/scenic/bin:scenic
#
# TODO(fxbug.dev/83213) Retain v1 component while out of tree tests need it.
fuchsia_component("component") {
component_name = "scenic"
manifest = "bin/meta/scenic.cmx"
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_component("component_v2") {
component_name = "scenic"
manifest = "bin/meta/scenic.cml"
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_package("scenic_pkg") {
package_name = "scenic"
deps = [
":component",
":component_v2",
]
}
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" ]
}