diff --git a/tests/e2e/run-local.sh b/tests/e2e/run-local.sh index ae3dd826..17cba136 100755 --- a/tests/e2e/run-local.sh +++ b/tests/e2e/run-local.sh @@ -76,9 +76,12 @@ undo_changes() { } on_exit() { + RET="$?" if [ "$undo" == "true" ]; then + [ "$RET" -ne 0 ] && echo && echo "ERROR: Testing failed with $RET, starting the cleanup..." undo_changes fi + [ "$RET" -ne 0 ] && echo && echo "ERROR: Testing failed with $RET" || echo "INFO: Testing passed" } trap on_exit EXIT