blob: 97dbb2ede2a40d519bda498910c8d5303ddf1b99 [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/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",
":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/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"
}
# 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/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 = 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("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("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" ]
}
}
# 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") {
component_name = "scenic"
manifest = "bin/meta/scenic_with_supplied_display_provider.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_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" ]
}