diff options
-rwxr-xr-x | test | 30 |
1 files changed, 23 insertions, 7 deletions
@@ -222,15 +222,31 @@ run() { PATH="/usr/sbin:/usr/bin:/sbin:/bin" \ DOMAINNAME="$DOMAINNAME" \ sh -ue "$testdir/run" || return $? - - # clean up - schroot -c "$CHROOT" -e - CHROOT="" } +RV=0 +declare -a PASSED=() FAILED=() for t in "${TESTS[@]}"; do - if ! run "$t"; then - echo "FAILED: $t" >&2 - exit 1 + run "$t" && rv=0 || rv=$? + if [ -n "$CHROOT" ]; then + # clean up + schroot -c "$CHROOT" -e + CHROOT="" + fi + if [ $rv -eq 0 ]; then + PASSED+=( "$t" ) + else + FAILED+=( "$t" ) + RV=$rv + break # stop at the first failure fi done + +echo >&2 +echo "================================================================================" >&2 + +echo "PASSED: ${PASSED[*]:-"(none)"}" >&2 +if [ ${#FAILED[@]} -gt 0 ]; then + echo "FAILED: ${FAILED[*]}" >&2 +fi +exit $RV |