Skip to content

Commit e8344e8

Browse files
avargitster
authored andcommitted
tests: Use skip_all=* to skip tests
Change tests to skip with skip_all=* + test_done instead of using say + test_done. This is a follow-up to "tests: Skip tests in a way that makes sense under TAP" (fadb515). I missed these cases when prepearing that patch, hopefully this is all of them. Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 4ecb793 commit e8344e8

File tree

7 files changed

+17
-18
lines changed

7 files changed

+17
-18
lines changed

t/gitweb-lib.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,12 +76,12 @@ gitweb_run () {
7676
. ./test-lib.sh
7777

7878
if ! test_have_prereq PERL; then
79-
say 'skipping gitweb tests, perl not available'
79+
skip_all='skipping gitweb tests, perl not available'
8080
test_done
8181
fi
8282

8383
perl -MEncode -e 'decode_utf8("", Encode::FB_CROAK)' >/dev/null 2>&1 || {
84-
say 'skipping gitweb tests, perl version is too old'
84+
skip_all='skipping gitweb tests, perl version is too old'
8585
test_done
8686
}
8787

t/lib-cvs.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export HOME
99

1010
if ! type cvs >/dev/null 2>&1
1111
then
12-
say 'skipping cvsimport tests, cvs not found'
12+
skip_all='skipping cvsimport tests, cvs not found'
1313
test_done
1414
fi
1515

@@ -21,11 +21,11 @@ case "$cvsps_version" in
2121
2.1 | 2.2*)
2222
;;
2323
'')
24-
say 'skipping cvsimport tests, cvsps not found'
24+
skip_all='skipping cvsimport tests, cvsps not found'
2525
test_done
2626
;;
2727
*)
28-
say 'skipping cvsimport tests, unsupported cvsps version'
28+
skip_all='skipping cvsimport tests, unsupported cvsps version'
2929
test_done
3030
;;
3131
esac

t/lib-git-svn.sh

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ PERL=${PERL:-perl}
2121
svn >/dev/null 2>&1
2222
if test $? -ne 1
2323
then
24-
say 'skipping git svn tests, svn not found'
24+
skip_all='skipping git svn tests, svn not found'
2525
test_done
2626
fi
2727

@@ -40,13 +40,12 @@ x=$?
4040
if test $x -ne 0
4141
then
4242
if test $x -eq 42; then
43-
err='Perl SVN libraries must be >= 1.1.0'
43+
skip_all='Perl SVN libraries must be >= 1.1.0'
4444
elif test $x -eq 41; then
45-
err='svnadmin failed to create fsfs repository'
45+
skip_all='svnadmin failed to create fsfs repository'
4646
else
47-
err='Perl SVN libraries not found or unusable, skipping test'
47+
skip_all='Perl SVN libraries not found or unusable'
4848
fi
49-
say "$err"
5049
test_done
5150
fi
5251

@@ -159,7 +158,7 @@ EOF
159158
require_svnserve () {
160159
if test -z "$SVNSERVE_PORT"
161160
then
162-
say 'skipping svnserve test. (set $SVNSERVE_PORT to enable)'
161+
skip_all='skipping svnserve test. (set $SVNSERVE_PORT to enable)'
163162
test_done
164163
fi
165164
}

t/lib-httpd.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ HTTPD_DOCUMENT_ROOT_PATH=$HTTPD_ROOT_PATH/www
4545

4646
if ! test -x "$LIB_HTTPD_PATH"
4747
then
48-
say "skipping test, no web server found at '$LIB_HTTPD_PATH'"
48+
skip_all="skipping test, no web server found at '$LIB_HTTPD_PATH'"
4949
test_done
5050
fi
5151

@@ -58,12 +58,12 @@ then
5858
then
5959
if ! test $HTTPD_VERSION -ge 2
6060
then
61-
say "skipping test, at least Apache version 2 is required"
61+
skip_all="skipping test, at least Apache version 2 is required"
6262
test_done
6363
fi
6464
if ! test -d "$DEFAULT_HTTPD_MODULE_PATH"
6565
then
66-
say "Apache module directory not found. Skipping tests."
66+
skip_all="Apache module directory not found. Skipping tests."
6767
test_done
6868
fi
6969

@@ -118,7 +118,7 @@ start_httpd() {
118118
>&3 2>&4
119119
if test $? -ne 0
120120
then
121-
say "skipping test, web server setup failed"
121+
skip_all="skipping test, web server setup failed"
122122
trap 'die' EXIT
123123
test_done
124124
fi

t/lib-patch-mode.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
. ./test-lib.sh
44

55
if ! test_have_prereq PERL; then
6-
say 'skipping --patch tests, perl not available'
6+
skip_all='skipping --patch tests, perl not available'
77
test_done
88
fi
99

t/t5800-remote-helpers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ if sys.hexversion < 0x02040000:
1515
then
1616
:
1717
else
18-
say 'skipping git remote-testgit tests: requires Python 2.4 or newer'
18+
skip_all='skipping git remote-testgit tests: requires Python 2.4 or newer'
1919
test_done
2020
fi
2121

t/t7005-editor.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ done
113113

114114
if ! echo 'echo space > "$1"' > "e space.sh"
115115
then
116-
say "Skipping; FS does not support spaces in filenames"
116+
skip_all="Skipping; FS does not support spaces in filenames"
117117
test_done
118118
fi
119119

0 commit comments

Comments
 (0)