diff --git a/tools/integration-tests.sh b/tools/integration-tests.sh index 385f0b876..46b0565b1 100755 --- a/tools/integration-tests.sh +++ b/tools/integration-tests.sh @@ -83,10 +83,18 @@ for TEST in ${TESTS}; do # Run test if (( ${VERBOSE} == 0 )); then timeout ${TIMEOUT} ${TEST} &> ${LOGDIR}/${TESTNAME}.log + RC=$? else - timeout ${TIMEOUT} ${TEST} + timeout ${TIMEOUT} ${TEST} | tee ${LOGDIR}/${TESTNAME}.log + RC=${PIPESTATUS[0]} + fi + + # Show full log in case of an error + if (( ${VERBOSE} == 0 )); then + if (( $RC != 99 )) || (( $RC != 0 )); then + cat ${LOGDIR}/${TESTNAME}.log + fi fi - RC=$? case $RC in 0)