]> git.ipfire.org Git - thirdparty/git.git/commitdiff
t9200: handle missing CVS with skip_all
authorPablo Sabater <pabloosabaterr@gmail.com>
Wed, 11 Mar 2026 19:40:02 +0000 (20:40 +0100)
committerJunio C Hamano <gitster@pobox.com>
Wed, 11 Mar 2026 19:53:16 +0000 (12:53 -0700)
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>
t/t9200-git-cvsexportcommit.sh

index a44eabf0d80fa8db991d77af4da49f58750cf43a..cba3b1a28a327ce193750d0819ee1d6a99ec34df 100755 (executable)
@@ -30,13 +30,17 @@ export CVSROOT CVSWORK GIT_DIR
 
 rm -rf "$CVSROOT" "$CVSWORK"
 
-cvs init &&
-test -d "$CVSROOT" &&
-cvs -Q co -d "$CVSWORK" . &&
-echo >empty &&
-git add empty &&
-git commit -q -a -m "Initial" 2>/dev/null ||
-exit 1
+if ! cvs init || ! test -d "$CVSROOT" || ! cvs -Q co -d "$CVSWORK" .
+then
+       skip_all="cvs repository set-up fails"
+       test_done
+fi
+
+test_expect_success 'git setup' '
+       echo >empty &&
+       git add empty &&
+       git commit -q -a -m Initial
+'
 
 check_entries () {
        # $1 == directory, $2 == expected