| # Copyright 2023 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/dist/resource.gni") |
| import("//build/testing/perf/test.gni") |
| import("//src/starnix/kernel/starnix.gni") |
| import("//src/starnix/tests/starnix_test_subpackages.gni") |
| |
| storage_benchmarks_target = "//src/storage/benchmarks/host:host-storage-benchmarks($target_linux_toolchain)" |
| |
| resource("storage-starnix-benchmarks-bin") { |
| out_dir = get_label_info(storage_benchmarks_target, "root_out_dir") |
| testonly = true |
| deps = [ storage_benchmarks_target ] |
| sources = [ "${out_dir}/storage-benchmarks" ] |
| outputs = [ "data/tests/storage-starnix-benchmarks" ] |
| } |
| |
| template("storage_starnix_benchmarks_component") { |
| fuchsia_test_component(target_name) { |
| testonly = true |
| test_type = "starnix" |
| deps = [ |
| ":storage-starnix-benchmarks-bin", |
| "//src/starnix/tests:starnix_test", |
| ] |
| manifest = "${invoker.manifest}" |
| } |
| } |
| |
| storage_starnix_benchmarks_component("storage-starnix-data-benchmarks") { |
| manifest = "meta/storage-starnix-data-benchmarks.cml" |
| } |
| |
| storage_starnix_benchmarks_component("storage-starnix-tmp-benchmarks") { |
| manifest = "meta/storage-starnix-tmp-benchmarks.cml" |
| } |
| |
| fuchsia_test_package("storage-starnix-benchmarks") { |
| test_components = [ |
| ":storage-starnix-data-benchmarks", |
| ":storage-starnix-tmp-benchmarks", |
| ] |
| subpackages = starnix_test_subpackages + |
| [ "//src/starnix/containers/debian:debian_package" ] |
| deps = [ "//src/starnix/containers/debian:container_resources" ] |
| test_specs = { |
| environments = [] |
| } |
| } |
| |
| fuchsia_component_perf_test("storage_starnix_data_benchmarks") { |
| package = ":storage-starnix-benchmarks" |
| component_name = "storage-starnix-data-benchmarks" |
| expected_metric_names_filepath = "//src/tests/end_to_end/perf/expected_metric_names/fuchsia.storage.starnix_data.txt" |
| use_component_builtin_args = true |
| test_type = "starnix" |
| } |
| |
| fuchsia_component_perf_test("storage_starnix_tmp_benchmarks") { |
| package = ":storage-starnix-benchmarks" |
| component_name = "storage-starnix-tmp-benchmarks" |
| expected_metric_names_filepath = "//src/tests/end_to_end/perf/expected_metric_names/fuchsia.storage.starnix_tmp.txt" |
| use_component_builtin_args = true |
| test_type = "starnix" |
| } |
| |
| group("benchmark-packages") { |
| testonly = true |
| deps = [ ":storage-starnix-benchmarks" ] |
| } |
| |
| group("benchmarks") { |
| testonly = true |
| deps = [] |
| if (!is_asan && host_os == "linux") { |
| deps += [ |
| ":storage_starnix_data_benchmarks", |
| ":storage_starnix_tmp_benchmarks", |
| ] |
| } |
| } |