propagate exit code in integration tests in verbose mode (#311)

Motivation:

Previously the integration tests ran in verbose mode wouldn't actually
fail as we didn't correctly propagate the exit code.

Modifications:

correctly propagate the exit code

Result:

integration tests correctly fail in verbose mode too
This commit is contained in:
Johannes Weiß 2018-04-13 13:35:37 +01:00 committed by Norman Maurer
parent 098239bb27
commit c9c43b53c1
1 changed files with 2 additions and 0 deletions

View File

@ -79,6 +79,8 @@ done
function run_test() { function run_test() {
if $verbose; then if $verbose; then
"$@" 2>&1 | tee -a "$out" "$@" 2>&1 | tee -a "$out"
# we need to return the return value of the first command
return ${PIPESTATUS[0]}
else else
"$@" >> "$out" 2>&1 "$@" >> "$out" 2>&1
fi fi