| # 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 += [ ":disable_syscalls_tests($host_toolchain)" ] |
| } |
| } |
| |
| if (is_linux) { |
| go_library("lib") { |
| testonly = true |
| |
| name = "fuchsia.googlesource.com/tests/disable_syscalls" |
| |
| deps = [ |
| "//src/testing/qemu", |
| ] |
| } |
| |
| group("syscall_zbi") { |
| metadata = { |
| test_runtime_deps = [ "$root_build_dir/zedboot.zbi" ] |
| } |
| } |
| |
| copy("copy_misc_tools") { |
| visibility = [ ":*" ] |
| |
| sources = [ |
| "$zircon_root_build_dir/tools/minfs", |
| "$zircon_root_build_dir/tools/zbi", |
| ] |
| outputs = [ |
| "$root_out_dir/test_data/tools/{{source_file_part}}", |
| ] |
| } |
| |
| group("misc_tools") { |
| deps = [ |
| ":copy_misc_tools", |
| ] |
| |
| metadata = { |
| test_runtime_deps = [ |
| "$root_out_dir/test_data/tools/zbi", |
| "$root_out_dir/test_data/tools/minfs", |
| ] |
| } |
| } |
| go_test("disable_syscalls_tests") { |
| gopackages = [ "fuchsia.googlesource.com/tests/disable_syscalls" ] |
| deps = [ |
| ":lib", |
| ] |
| non_go_deps = [ |
| ":syscall_zbi", |
| ":misc_tools", |
| ] |
| } |
| } |