diff options
author | Chris Evich <cevich@redhat.com> | 2019-04-30 13:09:32 -0400 |
---|---|---|
committer | Chris Evich <cevich@redhat.com> | 2019-05-21 08:44:02 -0400 |
commit | 95141f88d4e6f994c2972a63be19c82ef759ea5b (patch) | |
tree | f177ca42941649f7a88921f3d15b52bf8c8eb2ee /contrib/cirrus/lib.sh.t | |
parent | c4d9b03f7800e37df0a8821b450932700aac3c5d (diff) | |
download | podman-95141f88d4e6f994c2972a63be19c82ef759ea5b.tar.gz podman-95141f88d4e6f994c2972a63be19c82ef759ea5b.tar.bz2 podman-95141f88d4e6f994c2972a63be19c82ef759ea5b.zip |
Cirrus: fixups based on review feedback
Also remove disused distros (RHEL/CentOS/FAH) and fix get_ci_vm script
Signed-off-by: Chris Evich <cevich@redhat.com>
Diffstat (limited to 'contrib/cirrus/lib.sh.t')
-rwxr-xr-x | contrib/cirrus/lib.sh.t | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/contrib/cirrus/lib.sh.t b/contrib/cirrus/lib.sh.t index ce51f8ad2..1f05b3bb5 100755 --- a/contrib/cirrus/lib.sh.t +++ b/contrib/cirrus/lib.sh.t @@ -10,12 +10,13 @@ rc=0 function check_result { testnum=$(expr $testnum + 1) - if [ "$1" = "$2" ]; then - echo "ok $testnum $3 = $1" + MSG=$(echo "$1" | tr -d '*>\012'|sed -e 's/^ \+//') + if [ "$MSG" = "$2" ]; then + echo "ok $testnum $3 = $MSG" else echo "not ok $testnum $3" echo "# expected: $2" - echo "# actual: $1" + echo "# actual: $MSG" rc=1 fi } @@ -64,11 +65,17 @@ test_rev '' 1 'FATAL: req_env_var: invoked without arguments' unset FOO BAR test_rev FOO 9 'FATAL: test_rev() requires $FOO to be non-empty' test_rev BAR 9 'FATAL: test_rev() requires $BAR to be non-empty' - -# OK if desired envariable is unset +# OK if desired envariable was unset FOO=1 test_rev FOO 0 '' +# OK if multiple vars are non-empty +FOO="stuff" +BAR="things" +ENV_VARS="FOO BAR" +test_rev "$ENV_VARS" 0 '' +unset BAR + # ...but error if any single desired one is unset test_rev "FOO BAR" 9 'FATAL: test_rev() requires $BAR to be non-empty' |