summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-06-17 22:51:23 +0200
committerGitHub <noreply@github.com>2019-06-17 22:51:23 +0200
commite639a8fa3b8f1f00075f18fffb724601a6c73be1 (patch)
treea1520b95b34faba3ed5eab2fb9f0e5118afd7ee3
parent6ee0f3e99f3df1c45ed6c9e33a1b0de0a06cd560 (diff)
parentd6f436204f0c8c6ef4986c1b8ccff123f300cb34 (diff)
downloadpodman-e639a8fa3b8f1f00075f18fffb724601a6c73be1.tar.gz
podman-e639a8fa3b8f1f00075f18fffb724601a6c73be1.tar.bz2
podman-e639a8fa3b8f1f00075f18fffb724601a6c73be1.zip
Merge pull request #2947 from edsantiago/bats_in_cirrus
run BATS tests in Cirrus
-rw-r--r--.cirrus.yml2
-rw-r--r--Makefile7
l---------[-rwxr-xr-x]contrib/cirrus/system_test.sh22
-rw-r--r--test/system/030-run.bats4
4 files changed, 10 insertions, 25 deletions
diff --git a/.cirrus.yml b/.cirrus.yml
index 4b3b6f626..3b1c60638 100644
--- a/.cirrus.yml
+++ b/.cirrus.yml
@@ -278,6 +278,7 @@ testing_task:
setup_environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}'
unit_test_script: '$SCRIPT_BASE/unit_test.sh |& ${TIMESTAMP}'
integration_test_script: '$SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP}'
+ system_test_script: '$SCRIPT_BASE/system_test.sh |& ${TIMESTAMP}'
on_failure:
failed_master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
@@ -311,6 +312,7 @@ special_testing_rootless_task:
setup_environment_script: '$SCRIPT_BASE/setup_environment.sh |& ${TIMESTAMP}'
integration_test_script: '$SCRIPT_BASE/integration_test.sh |& ${TIMESTAMP}'
+ system_test_script: '$SCRIPT_BASE/system_test.sh |& ${TIMESTAMP}'
on_failure:
failed_master_script: '$CIRRUS_WORKING_DIR/$SCRIPT_BASE/notice_master_failure.sh'
diff --git a/Makefile b/Makefile
index 764cc0e2c..027f10445 100644
--- a/Makefile
+++ b/Makefile
@@ -220,8 +220,11 @@ localintegration: varlink_generate test-binaries ginkgo
remoteintegration: varlink_generate test-binaries ginkgo-remote
-localsystem: .install.ginkgo
- ginkgo -v -noColor test/system/
+localsystem:
+ if timeout -v 1 true; then PODMAN=./bin/podman bats test/system/; else echo "Skipping localsystem: 'timeout -v' unavailable'"; fi
+
+remotesystem:
+ @echo "remotesystem - unimplemented"
system.test-binary: .install.ginkgo
$(GO) test -c ./test/system
diff --git a/contrib/cirrus/system_test.sh b/contrib/cirrus/system_test.sh
index a2cc1af05..cbc481d6b 100755..120000
--- a/contrib/cirrus/system_test.sh
+++ b/contrib/cirrus/system_test.sh
@@ -1,21 +1 @@
-#!/bin/bash
-
-set -e
-source $(dirname $0)/lib.sh
-
-req_env_var GOSRC OS_RELEASE_ID OS_RELEASE_VER
-
-set -x
-cd "$GOSRC"
-
-case "${OS_RELEASE_ID}" in
- ubuntu) ;& # Continue to the next item
- fedora)
- make install.tools
- make
- make test-binaries
- ;;
- *) bad_os_id_ver ;;
-esac
-
-make localsystem
+integration_test.sh \ No newline at end of file
diff --git a/test/system/030-run.bats b/test/system/030-run.bats
index a29b1adc3..cefff0e2c 100644
--- a/test/system/030-run.bats
+++ b/test/system/030-run.bats
@@ -9,8 +9,8 @@ true | 0 |
false | 1 |
sh -c 'exit 32' | 32 |
echo $rand | 0 | $rand
-/no/such/command | 127 | Error: container create failed:.*exec:.* no such file or dir
-/etc | 126 | Error: container create failed:.*exec:.* permission denied
+/no/such/command | 127 | Error: .*: starting container process caused .*exec:.*stat /no/such/command: no such file or directory
+/etc | 126 | Error: .*: starting container process caused .*exec:.* permission denied
"
while read cmd expected_rc expected_output; do