| # 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("//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") { |
| testonly = true |
| 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 |
| } |
| } |
| |
| executable("bin") { |
| output_name = "vkproto-driver-tests" |
| testonly = true |
| 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/lib/fxl", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| ] |
| |
| 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" |
| testonly = true |
| deps = [ ":vkproto_driver_test_child_component" ] |
| deps += [ ":default_config" ] |
| } |
| |
| 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" ] |
| } |