| # 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/dart/test.gni") |
| import("//build/testing/environments.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| # This directory contains Dart wrappers for running performance tests |
| # that are defined elsewhere in the Fuchsia tree. |
| # |
| # The test wrappers in this directory are split into multiple test |
| # executables (dart_test targets here) because the Fuchsia Infra tools |
| # for retrying tests and tracking flakes operate on the granularity of |
| # test executables. |
| |
| test_list = [ |
| "garnet_input_latency_benchmarks_test", |
| "fidl_microbenchmarks_test", |
| "kernel_boot_timeline_test", |
| "microbenchmarks_test", |
| "netstack_benchmarks_test", |
| "netstack_iperf_test", |
| "rust_inspect_benchmarks_test", |
| "tspec_example_test", |
| ] |
| foreach(target_name, test_list) { |
| dart_test(target_name) { |
| sources = [ "$target_name.dart" ] |
| |
| deps = [ |
| "//sdk/testing/sl4f/client", |
| "//third_party/dart-pkg/pub/test", |
| ] |
| |
| non_dart_deps = [ ":runtime_deps($host_toolchain)" ] |
| |
| environments = [ |
| # Runs on "main" builders (try and ci) in NUC environments. |
| nuc_env, |
| ] |
| } |
| } |
| |
| if (is_host) { |
| host_test_data("runtime_deps") { |
| sources = [ "$root_out_dir/catapult_converter" ] |
| outputs = [ "$target_gen_dir/runtime_deps/{{source_file_part}}" ] |
| |
| deps = [ "//garnet/bin/catapult_converter:converter_bin" ] |
| |
| # TODO(48350): Enable host build for non-linux hosts as well. |
| if (host_os == "linux") { |
| sources += [ "$root_out_dir/iperf3" ] |
| deps += [ "//third_party/iperf:bin" ] |
| } |
| } |
| } |
| |
| # Packages required either: |
| # 1) by the Dart test wrappers in this directory, or |
| # 2) by the older test runner in src/tests/benchmarks/ which is |
| # used by the peridot-perf and fuchsia-perfcompare builders. This |
| # test runner will eventually be replaced by the Dart test |
| # wrappers (TODO(fxb/23091)), but sharing the same dependency |
| # declarations will ease this transition. |
| group("package_deps") { |
| testonly = true |
| public_deps = [ |
| "//garnet/examples/benchmark", |
| "//src/connectivity/network/tests/benchmarks:netstack_benchmarks", |
| "//src/lib/inspect/rust/fuchsia-inspect:benchmarks", |
| "//src/tests/benchmarks:kernel-boot-benchmarks", |
| "//src/tests/benchmarks/fidl:benchmarks", |
| "//src/tests/microbenchmarks:fuchsia_microbenchmarks_perftestmode", |
| "//third_party/iperf", |
| |
| # These are used by garnet_input_latency_benchmarks. |
| "//src/ui/bin/activity", |
| "//src/ui/examples:simplest_app", |
| "//src/ui/examples:yuv_to_image_pipe", |
| "//src/ui/tools:present_view", |
| |
| # These are used by the FIDL round trip benchmarks |
| "//src/tests/benchmarks/fidl/roundtrip", |
| |
| # These are used by the test runner in src/tests/benchmarks/, |
| # used by the peridot-perf and fuchsia-perfcompare builders. |
| "//garnet/bin/catapult_converter", |
| "//src/tests/benchmarks:fuchsia_benchmarks", |
| "//third_party/sbase:mkdir", |
| "//third_party/sbase:rm", |
| "//third_party/sbase:touch", |
| ] |
| } |
| |
| group("test") { |
| testonly = true |
| |
| deps = [] |
| foreach(target_name, test_list) { |
| deps += [ ":$target_name($host_toolchain)" ] |
| } |
| } |