@matheusbsbs / matheus-bagliano / commits / 900eab4427
Fork 0

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 <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Ævar Arnfjörð Bjarmason committed Aug 13, 2010 at 20:40 UTC 900eab442721087c2ca620caab0d1be0cc20c6df
1 file changed +18 -21
t/t9600-cvsimport.sh
+18 -21
@@ -3,17 +3,14 @@
3 test_description='git cvsimport basic tests'
4 . ./lib-cvs.sh
5
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 +'
10
14 -test_expect_success 'setup cvsroot' '$CVS init'
11 +test_expect_success PERL 'setup cvsroot' '$CVS init'
12
16 -test_expect_success 'setup a cvs module' '
13 +test_expect_success PERL 'setup a cvs module' '
14
15 mkdir "$CVSROOT/module" &&
16 $CVS co -d module-cvs module &&
@@ -45,23 +42,23 @@ EOF
42 cd ..
43 '
44
48 -test_expect_success 'import a trivial module' '
45 +test_expect_success PERL 'import a trivial module' '
46
47 git cvsimport -a -R -z 0 -C module-git module &&
48 test_cmp module-cvs/o_fortuna module-git/o_fortuna
49
50 '
51
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 ..'
53
57 -test_expect_success 'initial import has correct .git/cvs-revisions' '
54 +test_expect_success PERL 'initial import has correct .git/cvs-revisions' '
55
56 (cd module-git &&
57 git log --format="o_fortuna 1.1 %H" -1) > expected &&
58 test_cmp expected module-git/.git/cvs-revisions
59 '
60
64 -test_expect_success 'update cvs module' '
61 +test_expect_success PERL 'update cvs module' '
62
63 cd module-cvs &&
64 cat <<EOF >o_fortuna &&
@@ -90,7 +87,7 @@ EOF
87 cd ..
88 '
89
93 -test_expect_success 'update git module' '
90 +test_expect_success PERL 'update git module' '
91
92 cd module-git &&
93 git cvsimport -a -R -z 0 module &&
@@ -100,7 +97,7 @@ test_expect_success 'update git module' '
97
98 '
99
103 -test_expect_success 'update has correct .git/cvs-revisions' '
100 +test_expect_success PERL 'update has correct .git/cvs-revisions' '
101
102 (cd module-git &&
103 git log --format="o_fortuna 1.1 %H" -1 HEAD^ &&
@@ -108,7 +105,7 @@ test_expect_success 'update has correct .git/cvs-revisions' '
105 test_cmp expected module-git/.git/cvs-revisions
106 '
107
111 -test_expect_success 'update cvs module' '
108 +test_expect_success PERL 'update cvs module' '
109
110 cd module-cvs &&
111 echo 1 >tick &&
@@ -118,7 +115,7 @@ test_expect_success 'update cvs module' '
115
116 '
117
121 -test_expect_success 'cvsimport.module config works' '
118 +test_expect_success PERL 'cvsimport.module config works' '
119
120 cd module-git &&
121 git config cvsimport.module module &&
@@ -129,7 +126,7 @@ test_expect_success 'cvsimport.module config works' '
126
127 '
128
132 -test_expect_success 'second update has correct .git/cvs-revisions' '
129 +test_expect_success PERL 'second update has correct .git/cvs-revisions' '
130
131 (cd module-git &&
132 git log --format="o_fortuna 1.1 %H" -1 HEAD^^ &&
@@ -138,7 +135,7 @@ test_expect_success 'second update has correct .git/cvs-revisions' '
135 test_cmp expected module-git/.git/cvs-revisions
136 '
137
141 -test_expect_success 'import from a CVS working tree' '
138 +test_expect_success PERL 'import from a CVS working tree' '
139
140 $CVS co -d import-from-wt module &&
141 cd import-from-wt &&
@@ -150,12 +147,12 @@ test_expect_success 'import from a CVS working tree' '
147
148 '
149
153 -test_expect_success 'no .git/cvs-revisions created by default' '
150 +test_expect_success PERL 'no .git/cvs-revisions created by default' '
151
152 ! test -e import-from-wt/.git/cvs-revisions
153
154 '
155
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'
157
158 test_done