diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2019-06-27 03:31:35 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-06-27 03:31:35 +0200 |
commit | fccf4ad50327d6b74b3d3fa54bce449ea93a85cf (patch) | |
tree | 5cf8fdd676243dae9e4618df5a6d644a3156148d /contrib/cirrus/lib.sh | |
parent | 7705f99fe6cabe5028483e623b21177e25cc5d6f (diff) | |
parent | cd78825be7e5006140a49a26146f9123aeafd1d3 (diff) | |
download | podman-fccf4ad50327d6b74b3d3fa54bce449ea93a85cf.tar.gz podman-fccf4ad50327d6b74b3d3fa54bce449ea93a85cf.tar.bz2 podman-fccf4ad50327d6b74b3d3fa54bce449ea93a85cf.zip |
Merge pull request #3193 from cevich/check_image
Cirrus: More tests to verify cache_images
Diffstat (limited to 'contrib/cirrus/lib.sh')
-rw-r--r-- | contrib/cirrus/lib.sh | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/contrib/cirrus/lib.sh b/contrib/cirrus/lib.sh index 30141db67..36751fbd7 100644 --- a/contrib/cirrus/lib.sh +++ b/contrib/cirrus/lib.sh @@ -114,6 +114,30 @@ req_env_var() { done } +item_test() { + ITEM="$1" + shift + TEST_ARGS="$@" + req_env_var ITEM TEST_ARGS + + if ERR=$(test "$@" 2>&1) + then + echo "ok $ITEM" + return 0 + else + RET=$? + echo -n "not ok $ITEM: $TEST_ARGS" + if [[ -z "$ERR" ]] + then + echo "" + else # test command itself failed + echo -n ":" # space follows :'s in $ERR + echo "$ERR" | cut -d : -f 4- # omit filename, line number, and command + fi + return $RET + fi +} + show_env_vars() { echo "Showing selection of environment variable definitions:" _ENV_VAR_NAMES=$(awk 'BEGIN{for(v in ENVIRON) print v}' | \ |