summaryrefslogtreecommitdiffhomepage
path: root/kokoro/gcp_ubuntu
diff options
context:
space:
mode:
authorFabricio Voznika <fvoznika@google.com>2018-06-20 15:27:06 -0700
committerShentubot <shentubot@google.com>2018-06-20 15:28:12 -0700
commit2f59ba0e2d2169cf429b73a39a920f8d615f8eca (patch)
treec4eca86a2e976f488a8e7d1edf8eceaa577b9bbf /kokoro/gcp_ubuntu
parent2b5bdb525e99fc1ef099b2ef083a09772241ea58 (diff)
Include image test as part of kokoro tests
PiperOrigin-RevId: 201427731 Change-Id: I5cbee383ec51c02b7892ec7812cbbdc426be8991
Diffstat (limited to 'kokoro/gcp_ubuntu')
-rwxr-xr-xkokoro/gcp_ubuntu/run_tests.sh13
1 files changed, 13 insertions, 0 deletions
diff --git a/kokoro/gcp_ubuntu/run_tests.sh b/kokoro/gcp_ubuntu/run_tests.sh
index ce458be9c..2f5e375eb 100755
--- a/kokoro/gcp_ubuntu/run_tests.sh
+++ b/kokoro/gcp_ubuntu/run_tests.sh
@@ -31,6 +31,10 @@ cd git/repo
# Build everything.
bazel build //...
+# Test use this variable to determine what runtime to use.
+runtime=runsc_test_$((RANDOM))
+sudo -n ./runsc/test/image/install.sh --runtime ${runtime}
+
# Run the tests and upload results.
#
# We turn off "-e" flag because we must move the log files even if the test
@@ -38,6 +42,15 @@ bazel build //...
set +e
bazel test --test_output=errors //...
exit_code=${?}
+
+if [[ ${exit_code} -eq 0 ]]; then
+ # image_test is tagged manual
+ bazel test --test_output=errors --test_env=RUNSC_RUNTIME=${runtime} //runsc/test/image:image_test
+ exit_code=${?}
+fi
+
+# Best effort to uninstall
+sudo -n ./runsc/test/image/install.sh -u --runtime ${runtime}
set -e
# Find and rename all test xml and log files so that Sponge can pick them up.