blob: 169490b5bfe673b232229f341e64e72b4a72f620 [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/go/go_library.gni")
import("//build/go/go_test.gni")
group("tests") {
testonly = true
deps = []
if (host_os == "linux") {
deps += [
":recovery_simulator_boot_test($host_toolchain)",
":recovery_simulator_serial_test($host_toolchain)",
]
}
}
if (is_linux) {
# These take >5m (the infra timeout) if they're all in one binary, so they
# need to be split into multiple binaries.
template("split_go_test") {
split_name = invoker.target_name
go_library(target_name) {
testonly = true
source_dir = "//src/recovery/simulator/$split_name"
deps = [ "//tools/emulator/emulatortest" ]
forward_variables_from(invoker, [ "sources" ])
}
go_test("recovery_simulator_${split_name}") {
library = ":$split_name"
non_go_deps = [ "//build/images/recovery:test_data($host_toolchain)" ]
}
}
split_go_test("boot_test") {
sources = [ "boot_test.go" ]
}
split_go_test("serial_test") {
sources = [ "serial_test.go" ]
}
}