* [GSoC PATCH] t9200: handle missing CVS with skip_all
@ 2026-03-11 19:40 Pablo Sabater
2026-03-11 19:49 ` Junio C Hamano
0 siblings, 1 reply; 2+ messages in thread
From: Pablo Sabater @ 2026-03-11 19:40 UTC (permalink / raw)
To: git
Cc: gitster, christian.couder, karthik.188, jltobler, ayu.chandekar,
siddharthasthana31, chandrapratap3519, Pablo Sabater
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>
---
t/t9200-git-cvsexportcommit.sh | 18 +++++++++++-------
1 file changed, 11 insertions(+), 7 deletions(-)
diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
index a44eabf0d8..cba3b1a28a 100755
--- a/t/t9200-git-cvsexportcommit.sh
+++ b/t/t9200-git-cvsexportcommit.sh
@@ -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
--
2.43.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [GSoC PATCH] t9200: handle missing CVS with skip_all
2026-03-11 19:40 [GSoC PATCH] t9200: handle missing CVS with skip_all Pablo Sabater
@ 2026-03-11 19:49 ` Junio C Hamano
0 siblings, 0 replies; 2+ messages in thread
From: Junio C Hamano @ 2026-03-11 19:49 UTC (permalink / raw)
To: Pablo Sabater
Cc: git, christian.couder, karthik.188, jltobler, ayu.chandekar,
siddharthasthana31, chandrapratap3519
Pablo Sabater <pabloosabaterr@gmail.com> writes:
> 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>
> ---
> t/t9200-git-cvsexportcommit.sh | 18 +++++++++++-------
> 1 file changed, 11 insertions(+), 7 deletions(-)
Makes sense. Will queue. Thanks.
> diff --git a/t/t9200-git-cvsexportcommit.sh b/t/t9200-git-cvsexportcommit.sh
> index a44eabf0d8..cba3b1a28a 100755
> --- a/t/t9200-git-cvsexportcommit.sh
> +++ b/t/t9200-git-cvsexportcommit.sh
> @@ -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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-03-11 19:49 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-11 19:40 [GSoC PATCH] t9200: handle missing CVS with skip_all Pablo Sabater
2026-03-11 19:49 ` Junio C Hamano
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox