| # 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/test/test_package.gni") |
| import("//src/graphics/lib/magma/gnbuild/magma.gni") |
| |
| if (magma_openvx_package != "") { |
| import("$magma_openvx_package/fuchsia/openvx-data.gni") |
| } |
| |
| group("benchmark") { |
| testonly = true |
| |
| public_deps = [ |
| ":memcpy", |
| ":vkcopy", |
| ":vulkan-benchmark", |
| ] |
| if (magma_openvx_package != "") { |
| public_deps += [ ":vxcopy" ] |
| } |
| } |
| |
| test_package("vulkan-benchmark") { |
| deps = [ |
| ":memcpy", |
| ":vkcopy", |
| ] |
| |
| tests = [ |
| { |
| name = "vkcopy" |
| environments = magma_libvulkan_hardware_envs |
| }, |
| { |
| name = "test_memcpy" |
| }, |
| ] |
| } |
| |
| executable("memcpy") { |
| output_name = "test_memcpy" |
| |
| sources = [ "test_memcpy.cc" ] |
| } |
| |
| executable("vkcopy") { |
| testonly = true |
| |
| sources = [ "test_vkcopy.cc" ] |
| |
| deps = [ |
| "//src/graphics/tests/common", |
| "//src/lib/vulkan", |
| ] |
| |
| public_deps = [ |
| "//src/lib/fxl/test:test_settings", |
| "//third_party/googletest:gtest", |
| ] |
| |
| # TODO(fxbug.dev/66421): Fix LSan and remove this. |
| deps += [ "//build/config/sanitizers:suppress-lsan.DO-NOT-USE-THIS" ] |
| } |
| |
| if (magma_openvx_package != "") { |
| executable("vxcopy_bin") { |
| output_name = "vxcopy" |
| testonly = true |
| |
| sources = [ "test_vxcopy.cc" ] |
| |
| assert(magma_openvx_include != "") |
| include_dirs = [ "$magma_openvx_include" ] |
| |
| deps = [ |
| "$magma_openvx_package", |
| "//src/lib/fxl/test:gtest_main", |
| "//third_party/googletest:gtest", |
| ] |
| |
| ldflags = [ "-Wl,-z,stack-size=0x1000000" ] |
| } |
| |
| test_package("vxcopy") { |
| deps = [ ":vxcopy_bin" ] |
| |
| tests = [ |
| { |
| name = "vxcopy" |
| environments = [] |
| }, |
| ] |
| |
| resources = [] |
| resource_data = openvx_data |
| |
| foreach(file, resource_data) { |
| resources += [ |
| { |
| path = rebase_path(file[0]) |
| dest = file[1] |
| }, |
| ] |
| } |
| } |
| } |