blob: 7f41d7c8d783b53158288f381f5420dc8b50f787 [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/dart/dart_test_component.gni")
import("//build/fidl/fidl.gni")
import("//src/tests/benchmarks/fidl/benchmark_suite/benchmark_suite.gni")
import("//tools/fidl/gidl/gidl.gni")
# GIDL Benchmark
benchmark_dir = "$target_gen_dir/benchmark"
benchmark_file = "benchmark.dart"
benchmark_path = "$benchmark_dir/test/$benchmark_file"
gidl("benchmark_suite") {
type = "benchmark"
language = "dart"
inputs = benchmark_suite_gidl_files
fidl = benchmark_suite_fidl_target
output = benchmark_path
}
copy("copy_benchmark_component_analysis_options") {
sources = [ "analysis_options.yaml" ]
outputs = [ "${benchmark_dir}/test/analysis_options.yaml" ]
}
dart_test_component("benchmark-component") {
component_name = "dart-fidl-benchmarks"
manifest = "meta/dart-fidl-benchmarks.cmx"
package_root = benchmark_dir
sources = [ benchmark_file ]
deps = [
":copy_benchmark_component_analysis_options",
"//sdk/dart/fidl",
"//sdk/dart/fuchsia",
"//sdk/dart/zircon",
"//sdk/testing/sl4f/client",
"//src/lib/fidl/dart/gidl",
"//third_party/dart-pkg/pub/args",
"//third_party/dart-pkg/pub/test",
benchmark_suite_fidl_target,
]
non_dart_deps = [ ":benchmark_suite" ]
pubspec = "pubspec.yaml"
options_file = "${benchmark_dir}/test/analysis_options.yaml"
}
fuchsia_test_package("dart-fidl-benchmarks") {
test_components = [ ":benchmark-component" ]
}
group("dart") {
testonly = true
deps = [ ":dart-fidl-benchmarks" ]
}