summaryrefslogtreecommitdiff
path: root/contrib/cirrus
diff options
context:
space:
mode:
authorChris Evich <cevich@redhat.com>2018-10-10 09:42:09 -0400
committerChris Evich <cevich@redhat.com>2018-10-31 09:50:53 -0400
commit989affa2ddc5a3ba23342a9d70f975c3f8ad0519 (patch)
treee7578a194983d31b3dfa291267e903131c5636bc /contrib/cirrus
parentcf4288e3cc1cd95e512cae063066ca26917e378e (diff)
downloadpodman-989affa2ddc5a3ba23342a9d70f975c3f8ad0519.tar.gz
podman-989affa2ddc5a3ba23342a9d70f975c3f8ad0519.tar.bz2
podman-989affa2ddc5a3ba23342a9d70f975c3f8ad0519.zip
Cirrus-CI: Add option to run system-tests
Normally, we would not run system-tests as part of PR-level CI, they're simply too heavy-weight and complex. However, in some instances it may be desirable to provide a quick feedback loop, prior to release packaging and official testing. Enable this by executing the system-tests when a magic string is present in the PR description: ``***CIRRUS: SYSTEM TEST***`` Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus')
-rwxr-xr-xcontrib/cirrus/optional_system_test.sh24
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/cirrus/optional_system_test.sh b/contrib/cirrus/optional_system_test.sh
new file mode 100755
index 000000000..705dda5ad
--- /dev/null
+++ b/contrib/cirrus/optional_system_test.sh
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -e
+source $(dirname $0)/lib.sh
+
+MAGIC_RE='\*\*\*\s*CIRRUS:\s*SYSTEM\s*TEST\s*\*\*\*'
+if ! echo "$CIRRUS_CHANGE_MESSAGE" | egrep -q "$MAGIC_RE"
+then
+ echo "Skipping system-testing because PR title or description"
+ echo "does not match regular expression: $MAGIC_RE"
+ exit 0
+fi
+
+req_env_var "
+GOSRC $GOSRC
+OS_RELEASE_ID $OS_RELEASE_ID
+OS_RELEASE_VER $OS_RELEASE_VER
+"
+
+show_env_vars
+
+set -x
+cd "$GOSRC"
+make localsystem