diff options
author | Ilya Bobyr <ilya.bobyr@gmail.com> | 2014-04-30 02:50:43 -0700 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2014-06-06 13:48:00 -0700 |
commit | ef2ac68def0fd8a10e4df06706e7276ff63a58f2 (patch) | |
tree | d23ce2d89c8c0ed3c80f4cfe85be762a72df098b /t/test-lib.sh | |
parent | 5e3b4fce4293d89ea79433527e6d55f4bcd42bbd (diff) | |
download | git-ef2ac68def0fd8a10e4df06706e7276ff63a58f2.tar.gz git-ef2ac68def0fd8a10e4df06706e7276ff63a58f2.tar.xz |
test-lib: tests skipped by GIT_SKIP_TESTS say so
We used to show "(missing )" next to tests skipped because they are
specified in GIT_SKIP_TESTS. Use "(GIT_SKIP_TESTS)" instead.
Plus tests that check basic GIT_SKIP_TESTS functions.
Signed-off-by: Ilya Bobyr <ilya.bobyr@gmail.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 't/test-lib.sh')
-rw-r--r-- | t/test-lib.sh | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/t/test-lib.sh b/t/test-lib.sh index c081668df..e7d9c5110 100644 --- a/t/test-lib.sh +++ b/t/test-lib.sh @@ -452,25 +452,28 @@ test_finish_ () { test_skip () { to_skip= + skipped_reason= if match_pattern_list $this_test.$test_count $GIT_SKIP_TESTS then to_skip=t + skipped_reason="GIT_SKIP_TESTS" fi if test -z "$to_skip" && test -n "$test_prereq" && ! test_have_prereq "$test_prereq" then to_skip=t - fi - case "$to_skip" in - t) + of_prereq= if test "$missing_prereq" != "$test_prereq" then of_prereq=" of $test_prereq" fi - + skipped_reason="missing $missing_prereq${of_prereq}" + fi + case "$to_skip" in + t) say_color skip >&3 "skipping test: $@" - say_color skip "ok $test_count # skip $1 (missing $missing_prereq${of_prereq})" + say_color skip "ok $test_count # skip $1 ($skipped_reason)" : true ;; *) |