blob: 65d442bca0f51a64cfff21ec3ed7dfbd2021567f [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/lib/utils/build_args.gni")
group("scenic") {
public_deps = [ ":scenic_pkg" ]
}
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",
":input_unittests",
":scenic_unittests",
":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"
}
}
test_type = "vulkan"
}
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"
}
}
test_type = "vulkan"
}
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"
}
}
test_type = "vulkan"
}
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/bin/coordinator-connector:child-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,
]
}
test_type = "system"
}
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/fake-coordinator-connector:child-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
}
test_type = "vulkan"
}
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/fake-coordinator-connector:child-component",
] + scenic_test_deps
test_specs = {
log_settings = {
max_severity = "ERROR"
}
environments = [ aemu_env ] + basic_envs
}
test_type = "vulkan"
}
fuchsia_unittest_package("flatland_engine_unittests") {
manifest = "meta/flatland_engine_unittests.cml"
deps = [
"lib/flatland/engine/tests:unittests",
"//src/graphics/display/testing/fake-coordinator-connector:child-component",
] + scenic_test_deps
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
test_type = "vulkan"
}
fuchsia_unittest_package("flatland_renderer_unittests") {
manifest = "meta/flatland_renderer_unittests.cml"
deps = [
"lib/flatland/renderer/tests:unittests",
"//src/graphics/display/testing/fake-coordinator-connector:child-component",
] + scenic_test_deps
test_specs = {
log_settings = {
max_severity = "ERROR"
}
environments = basic_envs + magma_libvulkan_hardware_envs
}
test_type = "vulkan"
}
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"
}
}
test_type = "vulkan"
}
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_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"
}
}
test_type = "vulkan"
}
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"
}
}
test_type = "vulkan"
}
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"
}
}
test_type = "vulkan"
}
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("component_v2") {
cm_label = ":scenic_manifest"
deps = [
"bin",
"//src/ui/scenic/lib/image-compression:component",
]
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("scenic_config") {
cm_label = ":scenic_manifest"
values_source = "config/default_for_test.json5"
}
fuchsia_package("scenic_pkg") {
package_name = "scenic"
validate_structured_config = false
deps = [ ":component_v2" ]
}
group("scenic_with_default_config") {
deps = [
":component_v2",
":scenic_config",
]
}