blob: b96b3fe2e4ed4ae2fd405a42716cf2f97877fc34 [file] [log] [blame]
# Copyright 2019 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/package.gni")
import("//build/test.gni")
import("//build/test/test_package.gni")
import("//build/testing/environments.gni")
source_set("lib") {
sources = [
"action.h",
"measurement.h",
"object.h",
"random.h",
"tracing.cc",
"tracing.h",
"utility.cc",
"utility.h",
"worker.h",
"workload.cc",
"workload.h",
]
public_deps = [
"//src/lib/files",
"//src/lib/fxl",
"//third_party/rapidjson",
"//zircon/public/lib/fbl",
"//zircon/public/lib/fdio",
"//zircon/public/lib/fzl",
"//zircon/public/lib/sync",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
"//zircon/system/fidl/fuchsia-boot",
"//zircon/system/fidl/fuchsia-scheduler",
]
}
executable("bin") {
output_name = "loadbench"
sources = [ "loadbench.cc" ]
deps = [ ":lib" ]
}
package("loadbench") {
rootresource_svc = "//build"
deps = [ ":bin" ]
binary = "loadbench"
meta = [
{
path = rebase_path("meta/loadbench.cmx")
dest = "loadbench.cmx"
},
]
# Add benchmark specification files to this array.
json_files = [
"deadline_test.json",
"default.json",
"example.json",
"port_test.json",
"simple_load.json",
"relative_bandwidth.json",
"tests/automated/large_core_counts_overload_test.json",
"tests/dpc_latency.json",
]
# Build a resource entry for each benchmark specification.
resources = []
foreach(file, json_files) {
resources += [
{
path = rebase_path("data/$file")
dest = "$file"
},
]
}
}
executable("loadbench_unittests") {
testonly = true
sources = [ "tracing_unittest.cc" ]
deps = [
":lib",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
]
}
test_package("loadbench_tests") {
rootresource_svc = "//build"
deps = [ ":loadbench_unittests" ]
tests = [
{
name = "loadbench_unittests"
},
]
}