git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
* [PATCH] t4205: don't exit test script on failure
@ 2022-12-01 21:48 René Scharfe
  2022-12-01 23:05 ` Ævar Arnfjörð Bjarmason
  0 siblings, 1 reply; 6+ messages in thread
From: René Scharfe @ 2022-12-01 21:48 UTC (permalink / raw)
  To: Git List
  Cc: Junio C Hamano, Ævar Arnfjörð Bjarmason,
	Eric Sunshine

Only abort the individual check instead of exiting the whole test script
if git show fails.  Noticed with GIT_TEST_PASSING_SANITIZE_LEAK=check.

Helped-by: Eric Sunshine <sunshine@sunshineco.com>
Signed-off-by: René Scharfe <l.s.r@web.de>
---
Formatted with --function-context for easier review.
ac52d9410e (t4205: cover `git log --reflog -z` blindspot,
2019-11-19) added the exit call.

 t/t4205-log-pretty-formats.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/t/t4205-log-pretty-formats.sh b/t/t4205-log-pretty-formats.sh
index e448ef2928..0404491d6e 100755
--- a/t/t4205-log-pretty-formats.sh
+++ b/t/t4205-log-pretty-formats.sh
@@ -154,12 +154,12 @@ done
 test_expect_success 'NUL termination with --reflog --pretty=oneline' '
 	revs="$(git rev-list --reflog)" &&
 	for r in $revs
 	do
 		git show -s --pretty=oneline "$r" >raw &&
-		cat raw | lf_to_nul || exit 1
+		cat raw | lf_to_nul || return 1
 	done >expect &&
 	# the trailing NUL is already produced so we do not need to
 	# output another one
 	git log -z --pretty=oneline --reflog >actual &&
 	test_cmp expect actual
 '
--
2.30.2

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-12-03  0:54 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-01 21:48 [PATCH] t4205: don't exit test script on failure René Scharfe
2022-12-01 23:05 ` Ævar Arnfjörð Bjarmason
2022-12-01 23:24   ` Junio C Hamano
2022-12-02  0:07     ` Ævar Arnfjörð Bjarmason
2022-12-02  1:45       ` Junio C Hamano
2022-12-03  0:46         ` Junio C Hamano

Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).