Skip to content

Commit 900eab4

Browse files
avargitster
authored andcommitted
t/t9600-cvsimport.sh: change from skip_all=* to prereq skip
Change this test to skip test with test prerequisites, and to do setup work in tests. This improves the skipped statistics on platforms where the test isn't run. Signed-off-by: Ævar Arnfjörð Bjarmason <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent f2f7b6a commit 900eab4

File tree

1 file changed

+18
-21
lines changed

1 file changed

+18
-21
lines changed

t/t9600-cvsimport.sh

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,14 @@
33
test_description='git cvsimport basic tests'
44
. ./lib-cvs.sh
55

6-
if ! test_have_prereq PERL; then
7-
skip_all='skipping git cvsimport tests, perl not available'
8-
test_done
9-
fi
10-
11-
CVSROOT=$(pwd)/cvsroot
12-
export CVSROOT
6+
test_expect_success PERL 'setup cvsroot environment' '
7+
CVSROOT=$(pwd)/cvsroot &&
8+
export CVSROOT
9+
'
1310

14-
test_expect_success 'setup cvsroot' '$CVS init'
11+
test_expect_success PERL 'setup cvsroot' '$CVS init'
1512

16-
test_expect_success 'setup a cvs module' '
13+
test_expect_success PERL 'setup a cvs module' '
1714
1815
mkdir "$CVSROOT/module" &&
1916
$CVS co -d module-cvs module &&
@@ -45,23 +42,23 @@ EOF
4542
cd ..
4643
'
4744

48-
test_expect_success 'import a trivial module' '
45+
test_expect_success PERL 'import a trivial module' '
4946
5047
git cvsimport -a -R -z 0 -C module-git module &&
5148
test_cmp module-cvs/o_fortuna module-git/o_fortuna
5249
5350
'
5451

55-
test_expect_success 'pack refs' 'cd module-git && git gc && cd ..'
52+
test_expect_success PERL 'pack refs' 'cd module-git && git gc && cd ..'
5653

57-
test_expect_success 'initial import has correct .git/cvs-revisions' '
54+
test_expect_success PERL 'initial import has correct .git/cvs-revisions' '
5855
5956
(cd module-git &&
6057
git log --format="o_fortuna 1.1 %H" -1) > expected &&
6158
test_cmp expected module-git/.git/cvs-revisions
6259
'
6360

64-
test_expect_success 'update cvs module' '
61+
test_expect_success PERL 'update cvs module' '
6562
6663
cd module-cvs &&
6764
cat <<EOF >o_fortuna &&
@@ -90,7 +87,7 @@ EOF
9087
cd ..
9188
'
9289

93-
test_expect_success 'update git module' '
90+
test_expect_success PERL 'update git module' '
9491
9592
cd module-git &&
9693
git cvsimport -a -R -z 0 module &&
@@ -100,15 +97,15 @@ test_expect_success 'update git module' '
10097
10198
'
10299

103-
test_expect_success 'update has correct .git/cvs-revisions' '
100+
test_expect_success PERL 'update has correct .git/cvs-revisions' '
104101
105102
(cd module-git &&
106103
git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
107104
git log --format="o_fortuna 1.2 %H" -1 HEAD) > expected &&
108105
test_cmp expected module-git/.git/cvs-revisions
109106
'
110107

111-
test_expect_success 'update cvs module' '
108+
test_expect_success PERL 'update cvs module' '
112109
113110
cd module-cvs &&
114111
echo 1 >tick &&
@@ -118,7 +115,7 @@ test_expect_success 'update cvs module' '
118115
119116
'
120117

121-
test_expect_success 'cvsimport.module config works' '
118+
test_expect_success PERL 'cvsimport.module config works' '
122119
123120
cd module-git &&
124121
git config cvsimport.module module &&
@@ -129,7 +126,7 @@ test_expect_success 'cvsimport.module config works' '
129126
130127
'
131128

132-
test_expect_success 'second update has correct .git/cvs-revisions' '
129+
test_expect_success PERL 'second update has correct .git/cvs-revisions' '
133130
134131
(cd module-git &&
135132
git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
@@ -138,7 +135,7 @@ test_expect_success 'second update has correct .git/cvs-revisions' '
138135
test_cmp expected module-git/.git/cvs-revisions
139136
'
140137

141-
test_expect_success 'import from a CVS working tree' '
138+
test_expect_success PERL 'import from a CVS working tree' '
142139
143140
$CVS co -d import-from-wt module &&
144141
cd import-from-wt &&
@@ -150,12 +147,12 @@ test_expect_success 'import from a CVS working tree' '
150147
151148
'
152149

153-
test_expect_success 'no .git/cvs-revisions created by default' '
150+
test_expect_success PERL 'no .git/cvs-revisions created by default' '
154151
155152
! test -e import-from-wt/.git/cvs-revisions
156153
157154
'
158155

159-
test_expect_success 'test entire HEAD' 'test_cmp_branch_tree master'
156+
test_expect_success PERL 'test entire HEAD' 'test_cmp_branch_tree master'
160157

161158
test_done

0 commit comments

Comments
 (0)