blob: c1f4861015676ab07c2ce298df8ddd43954e6d54 [file] [log] [blame]
# 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/go/go_binary.gni")
import("//build/go/go_library.gni")
import("//build/go/go_test.gni")
go_library("lib") {
sources = [
"logprocessing.go",
"logprocessing_test.go",
"mass_test_failure_check.go",
"mass_test_failure_check_test.go",
"no_tests_ran_check.go",
"no_tests_ran_check_test.go",
"run_checks.go",
"run_checks_test.go",
"string_in_log_check.go",
"string_in_log_check_test.go",
"swarming.go",
"task_state_check.go",
"task_state_check_test.go",
"types.go",
]
deps = [
"//third_party/golibs:golang.org/x/sync",
"//tools/bootserver:bootserverconstants",
"//tools/botanist:constants",
"//tools/lib/ffxutil:constants",
"//tools/lib/serial:constants",
"//tools/lib/syslog:constants",
"//tools/net/netutil:constants",
"//tools/net/sshutil:constants",
"//tools/testing/testparser",
"//tools/testing/testrunner:constants",
]
}
go_library("main") {
source_dir = "cmd"
sources = [
"main.go",
"main_test.go",
]
deps = [
":lib",
"//tools/lib/flagmisc",
"//tools/testing/runtests",
]
}
go_binary("tefmocheck") {
gopackage = "go.fuchsia.dev/fuchsia/tools/testing/tefmocheck/cmd"
deps = [ ":main" ]
# Needed to support cross-compilation. The infra recipes always needs this
# built for Linux, even if build happens on Mac.
cgo = false
}
go_test("main_tests") {
output_name = "tefmocheck_tests"
gopackages = [ "go.fuchsia.dev/fuchsia/tools/testing/tefmocheck/cmd" ]
deps = [
":main",
"//third_party/golibs:github.com/google/go-cmp",
"//tools/testing/runtests",
]
}
go_test("lib_tests") {
output_name = "tefmocheck_lib_tests"
gopackages = [ "go.fuchsia.dev/fuchsia/tools/testing/tefmocheck" ]
deps = [
":lib",
"//third_party/golibs:github.com/google/go-cmp",
"//tools/testing/runtests",
]
}
group("tests") {
testonly = true
deps = [
":lib_tests",
":main_tests",
]
}