blob: 4a07b30236eb1e01f46736cca7cc69e1fee65bc0 [file] [log] [blame]
# Copyright 2021 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/packages/sdk_fuchsia_package.gni")
import("//src/graphics/examples/vkproto/common/common.gni")
import("//src/lib/vulkan/vulkan.gni")
fuchsia_component_manifest("vkproto_driver_tests_manifest") {
component_name = "vkproto-driver-test-child"
manifest = "meta/vkproto-driver-test-child.cml"
}
fuchsia_component("vkproto_driver_test_child_component") {
deps = [
":bin",
"//src/graphics/examples/vkproto:shaders",
"//src/lib/vulkan/validation_layers",
]
cm_label = ":vkproto_driver_tests_manifest"
}
fuchsia_structured_config_values("default_config") {
cm_label = ":vkproto_driver_tests_manifest"
values = {
gpu_vendor_id = 0
disabled_test_pattern = ""
}
}
executable("bin") {
output_name = "vkproto-driver-tests"
sources = [ "main.cc" ]
include_dirs = [ "//src/graphics/examples/vkproto/common" ]
defines = [ "VULKAN_HPP_NO_EXCEPTIONS" ]
deps = [
"//src/graphics/examples/vkproto/common:config_query",
"//src/graphics/examples/vkproto/common:srcs",
"//src/graphics/tests/common:gtest_main",
"//src/lib/fxl",
"//third_party/googletest:gtest_no_testonly",
"//zircon/system/ulib/zx",
]
include_dirs += [ "//src/graphics/examples/vkproto/fuchsia" ]
deps += [
"//src/lib/vulkan",
"//src/lib/vulkan/swapchain",
]
sources += [
"../fuchsia/fuchsia_surface.cc",
"../fuchsia/fuchsia_surface.h",
]
data = [
"../common/shaders/frag.spv",
"../common/shaders/vert.spv",
]
}
fuchsia_package("vkproto_driver_test_child_package") {
package_name = "vkproto-driver-test"
deps = [ ":vkproto_driver_test_child_component" ]
deps += [ ":default_config" ]
}
sdk_fuchsia_package("vkproto-driver-test-sdk") {
distribution_name = "vkproto-driver-test"
category = "partner"
package_label = ":vkproto_driver_test_child_package"
api_level_added = 19
expected_files_exact = [ "meta/vkproto-driver-test-child.cm" ]
}
fuchsia_test_component("vkproto_driver_tests_component") {
component_name = "vkproto-driver-tests"
manifest = "meta/vkproto_driver_tests.cml"
test_type = "vulkan"
}
fuchsia_test_package("vkproto-driver-test") {
package_name = "vkproto-driver-test"
test_components = [ ":vkproto_driver_tests_component" ]
subpackages = [ ":vkproto_driver_test_child_package" ]
test_specs = {
environments = vulkan_envs
}
}
group("driver-tests") {
testonly = true
deps = [ ":vkproto-driver-test" ]
}