blob: df97a81040564a771d65f506b1719f1726e1e560 [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/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")
group("scenic") {
public_deps = [ ":scenic_pkg" ]
}
group("tests") {
testonly = true
public_deps = [
":fuzzers",
":scenic_tests",
"lib/gfx/tests:mock_pose_buffer_provider",
"lib/gfx/tests/rotated_square_test",
"lib/scenic/util/tests:tests",
"lib/utils: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/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
},
{
name = "flatland_renderer_unittests"
environments = basic_envs
},
{
name = "gfx_apptests"
environments = basic_envs
},
{
name = "gfx_pixeltests"
environments = magma_libvulkan_hardware_envs
},
{
name = "gfx_swapchain_tests"
environments = 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 = 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
}
}