blob: c39c5a933fd2c36d1e9cccc2f1c333436cbf1edd [file] [log] [blame]
# 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")
if (magma_openvx_package != "") {
import("$magma_openvx_package/fuchsia/openvx-data.gni")
}
executable("test_membw_bin") {
output_name = "test_membw"
sources = [ "test_membw.cc" ]
}
fuchsia_component("test_membw_component") {
testonly = true
component_name = "test_membw"
deps = [ ":test_membw_bin" ]
manifest = "meta/test_membw.cmx"
}
fuchsia_test_package("test-membw") {
test_components = [ ":test_membw_component" ]
}
executable("vkcopy_bin") {
output_name = "vkcopy"
testonly = true
sources = [ "vkcopy.cc" ]
deps = [
"//src/graphics/tests/common",
"//src/lib/vulkan",
]
public_deps = [
"//src/lib/fxl/test:test_settings",
"//third_party/googletest:gtest",
]
}
if (magma_openvx_package != "") {
executable("vxcopy_bin") {
output_name = "vxcopy"
testonly = true
sources = [ "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" ]
}
vxcopy_resource_deps = []
i = 0
foreach(src_dst_pair, openvx_data) {
resource_target = "vxcopy_resource_$i"
resource(resource_target) {
sources = [ rebase_path(src_dst_pair[0]) ]
outputs = [ src_dst_pair[1] ]
}
vxcopy_resource_deps += [ ":$resource_target" ]
i += 1
}
fuchsia_component("vxcopy_cmp") {
testonly = true
component_name = "vxcopy"
deps = [ ":vxcopy_bin" ] + vxcopy_resource_deps
manifest = "meta/vxcopy.cmx"
}
fuchsia_test_package("vxcopy-pkg") {
package_name = "vxcopy"
test_components = [ ":vxcopy_cmp" ]
}
}
fuchsia_component("vkcopy_cmp") {
testonly = true
component_name = "vkcopy"
deps = [ ":vkcopy_bin" ]
manifest = "meta/vkcopy.cmx"
}
fuchsia_test_package("vkcopy-pkg") {
package_name = "vkcopy"
test_components = [ ":vkcopy_cmp" ]
test_specs = {
environments = magma_libvulkan_hardware_envs
}
}
group("vulkan-benchmark") {
testonly = true
deps = [
":test-membw",
":vkcopy-pkg",
]
}
group("benchmark") {
testonly = true
deps = [ ":vulkan-benchmark" ]
if (magma_openvx_package != "") {
deps += [ ":vxcopy-pkg" ]
}
}
group("linux_x64") {
testonly = true
deps = [
":test_membw_bin(//build/toolchain:linux_x64)",
":vkcopy_bin(//build/toolchain:linux_x64)",
]
}