| # Copyright 2020 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/go/go_binary.gni") |
| import("//build/go/go_library.gni") |
| import("//build/go/go_test.gni") |
| import("//build/go/toolchain.gni") |
| import("//src/tests/benchmarks/fidl/benchmark_suite/benchmark_suite.gni") |
| import("//tools/fidl/gidl/gidl.gni") |
| |
| gidl_go_out_dir = "$target_gen_dir/benchmark_suite" |
| |
| gidl("benchmark_suite_go") { |
| type = "benchmark" |
| language = "go" |
| inputs = benchmark_suite_gidl_files |
| fidl = benchmark_suite_fidl_target |
| output = "$gidl_go_out_dir/benchmark_suite.go" |
| } |
| |
| go_library("benchmark_suite_go_lib") { |
| testonly = true |
| name = "benchmark_suite" |
| source_dir = gidl_go_out_dir |
| non_go_deps = [ ":benchmark_suite_go" ] |
| deps = [ |
| "${benchmark_suite_fidl_target}(${go_toolchain})", |
| "//src/lib/component", |
| ] |
| sources = [ "benchmark_suite.go" ] |
| } |
| |
| go_binary("go_fidl_microbenchmarks_bin") { |
| testonly = true |
| output_name = "go_fidl_microbenchmarks" |
| gopackage = "go_fidl_microbenchmarks" |
| |
| deps = [ ":go_fidl_microbenchmarks_lib" ] |
| } |
| |
| go_library("go_fidl_microbenchmarks_lib") { |
| testonly = true |
| name = "go_fidl_microbenchmarks" |
| deps = [ |
| ":benchmark_suite_go_lib", |
| "//src/lib/go-benchmarking", |
| ] |
| sources = [ "main.go" ] |
| } |
| |
| fuchsia_shell_package("go") { |
| testonly = true |
| deps = [ ":go_fidl_microbenchmarks_bin" ] |
| } |