blob: 53f46f791494e158470f84ce09926284f4d20912 [file] [log] [blame] [edit]
# 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_library.gni")
import("//build/go/go_test.gni")
import("//build/testing/host_test_data.gni")
group("tests") {
testonly = true
deps = []
if (host_os == "linux") {
deps += [
":shell_default_test($host_toolchain)",
":shell_disabled_test($host_toolchain)",
":shell_enabled_test($host_toolchain)",
]
}
}
if (is_linux) {
host_test_data("main_zbi") {
sources = [ "$root_build_dir/fuchsia.zbi" ]
}
# 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/tests/disable_shell/$split_name"
deps = [ "//src/testing/emulator" ]
forward_variables_from(invoker, [ "sources" ])
}
go_test("${split_name}_test") {
gopackages =
[ "go.fuchsia.dev/fuchsia/src/tests/disable_shell/$split_name" ]
deps = [ ":$split_name" ]
non_go_deps = [ ":main_zbi" ]
}
}
split_go_test("shell_disabled") {
sources = [ "shell_disabled_test.go" ]
}
split_go_test("shell_enabled") {
sources = [ "shell_enabled_test.go" ]
}
split_go_test("shell_default") {
sources = [ "shell_default_test.go" ]
}
}