blob: 7b29e9f76f0855de534600ea264e9805e597006c [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/components.gni")
import("//build/test.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 = [
"//sdk/fidl/fuchsia.kernel",
"//sdk/fidl/fuchsia.scheduler",
"//sdk/lib/fdio",
"//src/lib/files",
"//src/lib/fxl",
"//third_party/rapidjson",
"//zircon/public/lib/fbl",
"//zircon/public/lib/sync",
"//zircon/public/lib/zircon-internal",
"//zircon/public/lib/zx",
"//zircon/system/ulib/fzl",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
executable("bin") {
output_name = "loadbench"
sources = [ "loadbench.cc" ]
deps = [ ":lib" ]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
resource("loadbench_files") {
sources = [
"data/deadline_test.json",
"data/default.json",
"data/example.json",
"data/port_test.json",
"data/relative_bandwidth.json",
"data/simple_load.json",
"data/tests/automated/large_core_counts_overload_test.json",
"data/tests/dpc_latency.json",
]
outputs = [ "data/{{source_file_part}}" ]
}
fuchsia_package_with_single_component("loadbench") {
manifest = "meta/loadbench.cmx"
deps = [
":bin",
":loadbench_files",
]
}
executable("loadbench_unittests") {
testonly = true
sources = [
"tracing_unittest.cc",
"workload_unittest.cc",
]
deps = [
":lib",
"//src/lib/fxl/test:gtest_main",
"//third_party/googletest:gmock",
]
# TODO(fxbug.dev/58162): delete the below and fix compiler warnings
configs += [ "//build/config:Wno-conversion" ]
}
fuchsia_unittest_package("loadbench_tests") {
component_name = "loadbench_unittests"
manifest = "meta/loadbench_unittests.cmx"
deps = [ ":loadbench_unittests" ]
test_specs = {
log_settings = {
max_severity = "ERROR"
}
}
}
group("tests") {
testonly = true
public_deps = [ ":loadbench_tests" ]
}