From: Junio C Hamano Date: Sat, 12 Jan 2013 02:34:43 +0000 (-0800) Subject: Merge branch 'rs/zip-tests' X-Git-Tag: v1.8.2-rc0~134 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/bf3f167d65fec8028b488ef0ce3baaa69a571ffd?ds=inline;hp=-c Merge branch 'rs/zip-tests' Update zip tests to skip some that cannot be handled on platform unzip. * rs/zip-tests: t5003: check if unzip supports symlinks t5000, t5003: move ZIP tests into their own script t0024, t5000: use test_lazy_prereq for UNZIP t0024, t5000: clear variable UNZIP, use GIT_UNZIP instead --- bf3f167d65fec8028b488ef0ce3baaa69a571ffd diff --combined t/test-lib.sh index 8a12cbb86a,c9a6b03953..d8ec408dfd --- a/t/test-lib.sh +++ b/t/test-lib.sh @@@ -85,6 -85,7 +85,7 @@@ unset VISUAL EMAIL LANGUAGE COLUMNS $(" .*_TEST PROVE VALGRIND + UNZIP PERF_AGGREGATING_LATER )); my @vars = grep(/^GIT_/ && !/^GIT_($ok)/o, @env); @@@ -128,6 -129,7 +129,7 @@@ f unset CDPATH unset GREP_OPTIONS + unset UNZIP case $(echo $GIT_TRACE |tr "[A-Z]" "[a-z]") in 1|2|true) @@@ -212,13 -214,11 +214,13 @@@ the error) tput bold; tput setaf 1;; # bold red skip) - tput bold; tput setaf 2;; # bold green + tput setaf 4;; # blue + warn) + tput setaf 3;; # brown/yellow pass) - tput setaf 2;; # green + tput setaf 2;; # green info) - tput setaf 3;; # brown + tput setaf 6;; # cyan *) test -n "$quiet" && return;; esac @@@ -300,7 -300,7 +302,7 @@@ test_ok_ () test_failure_ () { test_failure=$(($test_failure + 1)) - say_color error "not ok - $test_count $1" + say_color error "not ok $test_count - $1" shift echo "$@" | sed -e 's/^/# /' test "$immediate" = "" || { GIT_EXIT_OK=t; exit 1; } @@@ -308,12 -308,12 +310,12 @@@ test_known_broken_ok_ () { test_fixed=$(($test_fixed+1)) - say_color "" "ok $test_count - $@ # TODO known breakage" + say_color error "ok $test_count - $@ # TODO known breakage vanished" } test_known_broken_failure_ () { test_broken=$(($test_broken+1)) - say_color skip "not ok $test_count - $@ # TODO known breakage" + say_color warn "not ok $test_count - $@ # TODO known breakage" } test_debug () { @@@ -391,8 -391,7 +393,8 @@@ test_done () then test_results_dir="$TEST_OUTPUT_DIRECTORY/test-results" mkdir -p "$test_results_dir" - test_results_path="$test_results_dir/${0%.sh}-$$.counts" + base=${0##*/} + test_results_path="$test_results_dir/${base%.sh}-$$.counts" cat >>"$test_results_path" <<-EOF total $test_count @@@ -406,18 -405,13 +408,18 @@@ if test "$test_fixed" != 0 then - say_color pass "# fixed $test_fixed known breakage(s)" + say_color error "# $test_fixed known breakage(s) vanished; please update test(s)" fi if test "$test_broken" != 0 then - say_color error "# still have $test_broken known breakage(s)" - msg="remaining $(($test_count-$test_broken)) test(s)" + say_color warn "# still have $test_broken known breakage(s)" + fi + if test "$test_broken" != 0 || test "$test_fixed" != 0 + then + test_remaining=$(( $test_count - $test_broken - $test_fixed )) + msg="remaining $test_remaining test(s)" else + test_remaining=$test_count msg="$test_count test(s)" fi case "$test_failure" in @@@ -431,7 -425,7 +433,7 @@@ if test $test_external_has_tap -eq 0 then - if test $test_count -gt 0 + if test $test_remaining -gt 0 then say_color pass "# passed all $msg" fi @@@ -622,7 -616,7 +624,7 @@@ for skp in $GIT_SKIP_TEST do case "$this_test" in $skp) - say_color skip >&3 "skipping test $this_test altogether" + say_color info >&3 "skipping test $this_test altogether" skip_all="skip all tests in $this_test" test_done esac @@@ -746,12 -740,6 +748,12 @@@ test_lazy_prereq UTF8_NFD_TO_NFC esac ' +test_lazy_prereq AUTOIDENT ' + sane_unset GIT_AUTHOR_NAME && + sane_unset GIT_AUTHOR_EMAIL && + git var GIT_AUTHOR_IDENT +' + # When the tests are run as root, permission tests will report that # things are writable when they shouldn't be. test -w / || test_set_prereq SANITY