| # Copyright 2022 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/go/go_binary.gni") |
| import("//build/go/go_library.gni") |
| import("//build/go/go_test.gni") |
| import("//build/testing/host_test_data.gni") |
| |
| if (is_host) { |
| go_library("lib") { |
| sources = [ |
| "config.go", |
| "result.go", |
| "run.go", |
| "run_test.go", |
| ] |
| |
| deps = [ |
| "//tools/lib/clock", |
| "//tools/lib/streams", |
| "//tools/lib/subprocess", |
| ] |
| } |
| |
| go_library("main") { |
| source_dir = "cmd" |
| |
| sources = [ "main.go" ] |
| |
| deps = [ |
| ":lib", |
| "//tools/lib/color", |
| "//tools/lib/jsonutil", |
| "//tools/lib/logger", |
| ] |
| } |
| |
| go_binary("batchtester") { |
| library = ":main" |
| } |
| |
| go_test("batchtester_lib_tests") { |
| library = ":lib" |
| deps = [ "//third_party/golibs:github.com/google/go-cmp" ] |
| } |
| } |
| |
| group("tests") { |
| testonly = true |
| deps = [ ":batchtester_lib_tests($host_toolchain)" ] |
| } |