blob: fbc44b2ab154904ce79e66cb8b083e1466ea5b34 [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")
import("//build/testing/host_test_data.gni")
group("tests") {
testonly = true
deps = []
if (host_os == "linux") {
deps += [
":disable_debugging_disable_serial_test($host_toolchain)",
":disable_debugging_enable_serial_test($host_toolchain)",
":disable_debugging_output_only_serial_test($host_toolchain)",
":disabled_makes_ktrace_fail_test($host_toolchain)",
":enable_debugging_test($host_toolchain)",
":invalid_serial_setting_test($host_toolchain)",
":ktrace_works_when_enabled_test($host_toolchain)",
]
}
}
if (is_linux) {
host_test_data("syscall_zbi") {
sources = [ "$root_build_dir/zedboot.zbi" ]
}
host_test_data("misc_tools") {
visibility = [ ":*" ]
deps = [
"//src/storage/tools/logs/extract-logs",
"//zircon/tools/zbi",
]
sources = [
"$root_out_dir/extract-logs",
"$root_out_dir/zbi",
]
outputs = [ "$root_out_dir/test_data/tools/{{source_file_part}}" ]
}
# 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_syscalls/$split_name"
deps = [ "//tools/emulator/emulatortest" ]
forward_variables_from(invoker, [ "sources" ])
}
go_test("${split_name}_test") {
library = ":$split_name"
non_go_deps = [
":misc_tools",
":syscall_zbi",
]
}
}
split_go_test("disable_debugging_disable_serial") {
sources = [ "disable_debugging_disable_serial_test.go" ]
}
split_go_test("disable_debugging_enable_serial") {
sources = [ "disable_debugging_enable_serial_test.go" ]
}
split_go_test("disable_debugging_output_only_serial") {
sources = [ "disable_debugging_output_only_serial_test.go" ]
}
split_go_test("disabled_makes_ktrace_fail") {
sources = [ "disabled_makes_ktrace_fail_test.go" ]
}
split_go_test("enable_debugging") {
sources = [ "enable_debugging_test.go" ]
}
split_go_test("invalid_serial_setting") {
sources = [ "invalid_serial_setting_test.go" ]
}
split_go_test("ktrace_works_when_enabled") {
sources = [ "ktrace_works_when_enabled_test.go" ]
}
}