From: Junio C Hamano Date: Tue, 30 May 2017 02:16:44 +0000 (+0900) Subject: Merge branch 'jc/skip-test-in-the-middle' X-Git-Tag: v2.14.0-rc0~139 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/9aa55594027cc33def7c08ff4eea354a6e9c9457 Merge branch 'jc/skip-test-in-the-middle' A recent update to t5545-push-options.sh started skipping all the tests in the script when a web server testing is disabled or unavailable, not just the ones that require a web server. Non HTTP tests have been salvaged to always run in this script. * jc/skip-test-in-the-middle: t5545: enhance test coverage when no http server is installed test: allow skipping the remainder --- 9aa55594027cc33def7c08ff4eea354a6e9c9457 diff --cc t/test-lib.sh index 26b3edfb2e,30eb743719..ec2571f018 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@@ -758,18 -751,25 +751,30 @@@ test_done () then say_color pass "# passed all $msg" fi - say "1..$test_count$skip_all" + + # Maybe print SKIP message + test -z "$skip_all" || skip_all="# SKIP $skip_all" + case "$test_count" in + 0) + say "1..$test_count${skip_all:+ $skip_all}" + ;; + *) + test -z "$skip_all" || + say_color warn "$skip_all" + say "1..$test_count" + ;; + esac fi - test -d "$remove_trash" && - cd "$(dirname "$remove_trash")" && - rm -rf "$(basename "$remove_trash")" + if test -z "$debug" + then + test -d "$TRASH_DIRECTORY" || + error "Tests passed but trash directory already removed before test cleanup; aborting" + cd "$TRASH_DIRECTORY/.." && + rm -fr "$TRASH_DIRECTORY" || + error "Tests passed but test cleanup failed; aborting" + fi test_at_end_hook_ exit 0 ;;