summaryrefslogtreecommitdiffhomepage
path: root/kokoro
diff options
context:
space:
mode:
authorAndrei Vagin <avagin@google.com>2019-02-11 12:42:20 -0800
committerShentubot <shentubot@google.com>2019-02-11 12:43:38 -0800
commitecce96bab56de3aedd7d5cf47a6981f0f56acba1 (patch)
tree67dc95abad53f0fbda9a4865a21457f034472cb5 /kokoro
parentefe5e737d7da48e6f99a1d9a53fe04b6d21b7511 (diff)
gvisor: Run syscall tests in kokoro on the rbe cluster
PiperOrigin-RevId: 233458853 Change-Id: I92c734b8075aa31e040fe7b4770bcf608e271e7a
Diffstat (limited to 'kokoro')
-rw-r--r--kokoro/presubmit.cfg1
-rwxr-xr-xkokoro/run_tests.sh27
2 files changed, 21 insertions, 7 deletions
diff --git a/kokoro/presubmit.cfg b/kokoro/presubmit.cfg
index a834db198..2d8ab76d6 100644
--- a/kokoro/presubmit.cfg
+++ b/kokoro/presubmit.cfg
@@ -7,5 +7,6 @@ action {
define_artifacts {
regex: "**/sponge_log.xml"
regex: "**/sponge_log.log"
+ regex: "**/outputs.zip"
}
}
diff --git a/kokoro/run_tests.sh b/kokoro/run_tests.sh
index 3343b3093..81d428d59 100755
--- a/kokoro/run_tests.sh
+++ b/kokoro/run_tests.sh
@@ -33,8 +33,6 @@ readonly RUNTIME="runsc_test_$((RANDOM))"
# Packages that will be built and tested.
readonly BUILD_PACKAGES=("//...")
-# TODO: Include syscall tests in "test" directory once all tests
-# pass on RBE.
readonly TEST_PACKAGES=("//pkg/..." "//runsc/..." "//tools/...")
#######################
@@ -174,17 +172,30 @@ run_root_tests() {
sudo -n -E RUNSC_RUNTIME="${RUNTIME}" RUNSC_EXEC=/tmp/"${RUNTIME}"/runsc ${root_test}
}
+# Run syscall unit tests.
+run_syscall_tests() {
+ cd ${WORKSPACE_DIR}
+ # TODO: Exclude tests which fail.
+ bazel \
+ "${BAZEL_RBE_FLAGS[@]}" \
+ test "${BAZEL_BUILD_RBE_FLAGS[@]}" \
+ `bazel query //test/syscalls/... |
+ grep runsc_ptrace |
+ grep -v affinity_test_runsc_ptrace |
+ grep -v exec_test_runsc_ptrace |
+ grep -v open_create_test_runsc_ptrace |
+ grep -v clock_gettime_test_runsc_ptrace`
+}
+
# Find and rename all test xml and log files so that Sponge can pick them up.
# XML files must be named sponge_log.xml, and log files must be named
# sponge_log.log. We move all such files into KOKORO_ARTIFACTS_DIR, in a
# subdirectory named with the test name.
upload_test_artifacts() {
cd ${WORKSPACE_DIR}
- for file in $(find -L "bazel-testlogs" -name "test.xml" -o -name "test.log"); do
- newpath=${KOKORO_ARTIFACTS_DIR}/$(dirname ${file})
- extension="${file##*.}"
- mkdir -p "${newpath}" && cp "${file}" "${newpath}/sponge_log.${extension}"
- done
+ find -L "bazel-testlogs" -name "test.xml" -o -name "test.log" -o -name "outputs.zip" |
+ tar --create --files-from - --transform 's/test\./sponge_log./' |
+ tar --extract --directory ${KOKORO_ARTIFACTS_DIR}
}
# Finish runs at exit, even in the event of an error, and uploads all test
@@ -214,6 +225,8 @@ main() {
run_docker_tests
run_root_tests
+ run_syscall_tests
+
# No need to call "finish" here, it will happen at exit.
}