blob: 62da4543cc664f145b27dc5fb635141a29ab504d [file] [log] [blame]
# Copyright 2018 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/config/fuchsia/zircon.gni")
import("//build/images/manifest.gni")
import("//build/package.gni")
executable("garnet_benchmarks_bin") {
output_name = "garnet_benchmarks"
sources = [
"benchmarks.cc",
"gfx_benchmarks.cc",
"gfx_benchmarks.h",
]
deps = [
"//garnet/testing/benchmarking:benchmarking",
"//garnet/testing/benchmarking:is_vulkan_supported",
]
}
executable("garnet_benchmarks_perfcompare_bin") {
output_name = "garnet_benchmarks_perfcompare"
sources = [
"benchmarks_perfcompare.cc",
]
deps = [
"//garnet/testing/benchmarking:benchmarking",
]
}
zircon_tests = [
"test/fs/fs-bench-test",
"test/sys/blobfs-bench-test",
"test/sys/perf-test",
]
action("zircon-test-manifest") {
visibility = [ ":*" ]
foreach(image, zircon_images) {
if (image.type == "manifest" && image.name == "legacy-tests-$target_cpu") {
sources = [
"$zircon_root_build_dir/${image.path}",
]
}
}
outputs = [
"$target_gen_dir/zircon-tests.manifest",
]
script = "//build/images/manifest.py"
args = [ "--output=" + rebase_path(outputs[0], root_build_dir) ]
foreach(test, zircon_tests) {
args += [ "--include=$test" ]
}
foreach(manifest, sources) {
args += [
"--cwd=" + rebase_path(get_path_info(manifest, "dir"), root_build_dir),
"--manifest=" + rebase_path(manifest, root_build_dir),
]
}
}
package("garnet_benchmarks") {
testonly = true
deps = [
":garnet_benchmarks_bin",
":garnet_benchmarks_perfcompare_bin",
":zircon-test-manifest",
]
extra = [ "$target_gen_dir/zircon-tests.manifest" ]
binaries = [
{
name = rebase_path("benchmarks.sh")
dest = "benchmarks.sh"
},
{
shell = true
name = "garnet_benchmarks"
},
{
name = rebase_path("benchmarks_perfcompare.sh")
dest = "benchmarks_perfcompare.sh"
},
{
shell = true
name = "garnet_benchmarks_perfcompare"
},
]
}