summaryrefslogtreecommitdiffhomepage
path: root/test/syscalls
diff options
context:
space:
mode:
authorAdin Scannell <ascannell@google.com>2019-09-03 22:01:34 -0700
committergVisor bot <gvisor-bot@google.com>2019-09-03 22:02:43 -0700
commit67a2ab1438cdccbe045143bbfaa807cf83110ebc (patch)
tree8c17f5ecd3e5b3e9c4decb46d8f2b2e893809dc1 /test/syscalls
parent144127e5e1c548150f49501a7decb82ec2e239f2 (diff)
Impose order on test scripts.
The simple test script has gotten out of control. Shard this script into different pieces and attempt to impose order on overall test structure. This change helps lay some of the foundations for future improvements. * The runsc/test directories are moved into just test/. * The runsc/test/testutil package is split into logical pieces. * The scripts/ directory contains new top-level targets. * Each test is now responsible for building targets it requires. * The install functionality is moved into `runsc` itself for simplicity. * The existing kokoro run_tests.sh file now just calls all (can be split). After this change is merged, I will create multiple distinct workflows for Kokoro, one for each of the scripts currently targeted by `run_tests.sh` today, which should dramatically reduce the time-to-run for the Kokoro tests, and provides a better foundation for further improvements to the infrastructure. PiperOrigin-RevId: 267081397
Diffstat (limited to 'test/syscalls')
-rw-r--r--test/syscalls/BUILD3
-rw-r--r--test/syscalls/build_defs.bzl1
-rw-r--r--test/syscalls/syscall_test_runner.go2
3 files changed, 4 insertions, 2 deletions
diff --git a/test/syscalls/BUILD b/test/syscalls/BUILD
index a8a2e75d3..58eb1154a 100644
--- a/test/syscalls/BUILD
+++ b/test/syscalls/BUILD
@@ -693,6 +693,7 @@ syscall_test(test = "//test/syscalls/linux:proc_net_udp_test")
go_binary(
name = "syscall_test_runner",
+ testonly = 1,
srcs = ["syscall_test_runner.go"],
data = [
"//runsc",
@@ -700,7 +701,7 @@ go_binary(
deps = [
"//pkg/log",
"//runsc/specutils",
- "//runsc/test/testutil",
+ "//runsc/testutil",
"//test/syscalls/gtest",
"@com_github_opencontainers_runtime-spec//specs-go:go_default_library",
"@org_golang_x_sys//unix:go_default_library",
diff --git a/test/syscalls/build_defs.bzl b/test/syscalls/build_defs.bzl
index 60df47798..e94ef5602 100644
--- a/test/syscalls/build_defs.bzl
+++ b/test/syscalls/build_defs.bzl
@@ -94,6 +94,7 @@ def _syscall_test(
# more stable.
if platform == "kvm":
tags += ["manual"]
+ tags += ["requires-kvm"]
args = [
# Arguments are passed directly to syscall_test_runner binary.
diff --git a/test/syscalls/syscall_test_runner.go b/test/syscalls/syscall_test_runner.go
index 32408f021..e900f8abc 100644
--- a/test/syscalls/syscall_test_runner.go
+++ b/test/syscalls/syscall_test_runner.go
@@ -35,7 +35,7 @@ import (
"golang.org/x/sys/unix"
"gvisor.dev/gvisor/pkg/log"
"gvisor.dev/gvisor/runsc/specutils"
- "gvisor.dev/gvisor/runsc/test/testutil"
+ "gvisor.dev/gvisor/runsc/testutil"
"gvisor.dev/gvisor/test/syscalls/gtest"
)