| # 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", |
| "//third_party/re2", |
| "//zircon/system/ulib/fbl", |
| "//zircon/system/ulib/fzl", |
| "//zircon/system/ulib/sync", |
| "//zircon/system/ulib/zircon-internal", |
| "//zircon/system/ulib/zx", |
| ] |
| } |
| |
| executable("bin") { |
| output_name = "loadbench" |
| sources = [ "loadbench.cc" ] |
| |
| deps = [ ":lib" ] |
| } |
| |
| 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", |
| "//third_party/re2", |
| ] |
| } |
| |
| fuchsia_unittest_package("loadbench_tests") { |
| component_name = "loadbench_unittests" |
| manifest = "meta/loadbench_unittests.cml" |
| deps = [ ":loadbench_unittests" ] |
| test_specs = { |
| log_settings = { |
| max_severity = "ERROR" |
| } |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| public_deps = [ ":loadbench_tests" ] |
| } |