vmcheck: Run vm_kola_spawn separately from if-statement

Classic shell gotcha. We don't want to run `vm_kola_spawn` as part of
the if-statement or otherwise we lose the `set -e` behaviour.
This commit is contained in:
Jonathan Lebon 2020-03-18 15:02:36 -04:00 committed by OpenShift Merge Robot
parent e6907d209b
commit 7745728669

View File

@ -37,8 +37,8 @@ export VMTESTS=1
# shellcheck source=../common/libvm.sh
. "${commondir}/libvm.sh"
if vm_kola_spawn "${outputdir}/kola" && \
"${topsrcdir}/tests/vmcheck/test-${testname}.sh"; then
vm_kola_spawn "${outputdir}/kola"
if "${topsrcdir}/tests/vmcheck/test-${testname}.sh"; then
echo "PASS: ${testname}" >&3
else
echo "FAIL: ${testname}" >&3