| # Copyright 2017 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/lib/magma/gnbuild/magma.gni") |
| |
| fuchsia_component_manifest("config-manifest") { |
| component_name = "vkloop-test-child" |
| manifest = "meta/vkloop-test-child.cml" |
| } |
| |
| fuchsia_structured_config_cpp_elf_lib("config") { |
| cm_label = ":config-manifest" |
| } |
| |
| executable("vkloop_bin") { |
| testonly = true |
| output_name = "vkloop" |
| |
| sources = [ "vkloop.cc" ] |
| |
| deps = [ |
| ":config", |
| "//sdk/fidl/fuchsia.gpu.magma:fuchsia.gpu.magma_cpp", |
| "//sdk/lib/magma_client:magma_headers", |
| "//src/graphics/lib/magma/src/libmagma", |
| "//src/graphics/magma/lib/magma_client/test_util:test_device_helper", |
| "//src/graphics/tests/common", |
| "//src/graphics/tests/common:gtest_main", |
| ] |
| public_deps = [ |
| "//src/lib/fxl/test:test_settings", |
| "//third_party/googletest:gtest", |
| ] |
| |
| public_deps += [ "//src/lib/vulkan" ] |
| } |
| |
| resource("shaders") { |
| sources = [ "./vkloop.spv" ] |
| outputs = [ "data/{{source_file_part}}" ] |
| } |
| |
| fuchsia_structured_config_values("default_config") { |
| cm_label = ":config-manifest" |
| values = { |
| gpu_vendor_id = 0 |
| gpu_driver_url = "" |
| disabled_test_pattern = "" |
| } |
| } |
| |
| fuchsia_component("vkloop_cmp") { |
| cm_label = ":config-manifest" |
| component_name = "vkloop-test-child" |
| testonly = true |
| deps = [ |
| ":shaders", |
| ":vkloop_bin", |
| "//src/lib/vulkan/validation_layers", |
| ] |
| } |
| |
| fuchsia_package("vkloop-child-package") { |
| package_name = "vkloop-test" |
| deps = [ |
| ":default_config", |
| ":vkloop_cmp", |
| ] |
| testonly = true |
| } |
| |
| fuchsia_test_component("vkloop-test-cmp") { |
| component_name = "vkloop-test" |
| manifest = "meta/vkloop.cml" |
| test_type = "device" |
| } |
| |
| fuchsia_test_package("vkloop-pkg") { |
| package_name = "vkloop_test" |
| test_components = [ ":vkloop-test-cmp" ] |
| subpackages = [ ":vkloop-child-package" ] |
| test_specs = { |
| # ARM hardware needs to use vkloop-mali-pkg below |
| environments = |
| magma_libvulkan_hardware_envs - magma_libvulkan_arm_hardware_envs |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| fuchsia_test_component("vkloop-mali-test-cmp") { |
| component_name = "vkloop-mali-test" |
| manifest = "meta/vkloop-mali-test.cml" |
| test_type = "device" |
| restricted_features = [ "config_capabilities" ] |
| } |
| |
| fuchsia_test_package("vkloop-mali-pkg") { |
| package_name = "vkloop_mali_test" |
| test_components = [ ":vkloop-mali-test-cmp" ] |
| subpackages = [ ":vkloop-child-package" ] |
| test_specs = { |
| environments = magma_libvulkan_arm_hardware_envs |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("vkloop") { |
| testonly = true |
| deps = [ |
| ":vkloop-mali-pkg", |
| ":vkloop-pkg", |
| ] |
| } |