Skip to content

Commit 6523589

Browse files
pabloosabaterrgitster
authored andcommitted
t9200: handle missing CVS with skip_all
CVS initialization runs outside a test_expect_success and when it fails, the error report isn't good. Wrap CVS initialization in a skip_all check so when CVS initialization fails, the error report becomes clearer. Move the Git repo initialization into its own test_expect_success instead of being in the same CVS check. Signed-off-by: Pablo Sabater <pabloosabaterr@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 4aa72ea commit 6523589

1 file changed

Lines changed: 11 additions & 7 deletions

File tree

t/t9200-git-cvsexportcommit.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,17 @@ export CVSROOT CVSWORK GIT_DIR
3030

3131
rm -rf "$CVSROOT" "$CVSWORK"
3232

33-
cvs init &&
34-
test -d "$CVSROOT" &&
35-
cvs -Q co -d "$CVSWORK" . &&
36-
echo >empty &&
37-
git add empty &&
38-
git commit -q -a -m "Initial" 2>/dev/null ||
39-
exit 1
33+
if ! cvs init || ! test -d "$CVSROOT" || ! cvs -Q co -d "$CVSWORK" .
34+
then
35+
skip_all="cvs repository set-up fails"
36+
test_done
37+
fi
38+
39+
test_expect_success 'git setup' '
40+
echo >empty &&
41+
git add empty &&
42+
git commit -q -a -m Initial
43+
'
4044

4145
check_entries () {
4246
# $1 == directory, $2 == expected

0 commit comments

Comments
 (0)