Re: [PATCH 06/12] t: prepare execution of potentially failing commands for `set -e`
- From
Patrick Steinhardt <ps@pks.im>
- Date
- Apr 14, 2026, 07:23 UTC
- Message-ID
- <ad3rgbgadjIZRgaz@pks.im>
- In-Reply-To
- <xmqq340yfivf.fsf@gitster.g>
On Mon, Apr 13, 2026 at 06:09:08PM -0700, Junio C Hamano wrote:
Show 29 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
>
> > I think I know what is lacking in this patch. Following the above
> > section (which is a good conversion), there is this bit that needs a
> > similar handling.
> >
> > t/lib-git-svn.sh | 4 ++--
> > 1 file changed, 2 insertions(+), 2 deletions(-)
> >
> > diff --git c/t/lib-git-svn.sh w/t/lib-git-svn.sh
> > index 2fde2353fd..24c15d17eb 100644
> > --- c/t/lib-git-svn.sh
> > +++ w/t/lib-git-svn.sh
> > @@ -27,13 +27,13 @@ export svnrepo
> > svnconf=$PWD/svnconf
> > export svnconf
> >
> > +x=0
> > perl -w -e "
> > use SVN::Core;
> > use SVN::Repos;
> > \$SVN::Core::VERSION gt '1.1.0' or exit(42);
> > system(qw/svnadmin create --fs-type fsfs/, \$ENV{svnrepo}) == 0 or exit(41);
> > -" >&3 2>&4
> > -x=$?
> > +" >&3 2>&4 || x=$?
> > if test $x -ne 0
> > then
> > if test $x -eq 42; thenThanks, I've queued that change locally.
Show 35 quoted lines
> The above is queued as a squash fix-up on top of the topic, but with > the topic merged to 'seen', we seem to be getting a CI failure that > appears specific to macOS. Compare the failing > > https://github.com/git/git/actions/runs/24371204585 (aa13593) > > with the same tree without the topic > > https://github.com/git/git/actions/runs/24369661492 (ad8b884) > > The only differences between the commits are > > $ git diff --compact-summary ad8b884 aa13593 > t/lib-git-daemon.sh | 13 ++++++++++--- > t/lib-git-svn.sh | 7 +++---- > t/lib-httpd.sh | 3 +-- > t/t0005-signals.sh | 4 ++-- > t/t0008-ignores.sh | 4 ++-- > t/t1301-shared-repo.sh | 2 +- > t/t3600-rm.sh | 2 +- > t/t4032-diff-inter-hunk-context.sh | 14 ++++++++------ > t/t6002-rev-list-bisect.sh | 17 ++++++++++------- > t/t7450-bad-git-dotfiles.sh | 24 +++++++++++++----------- > t/t7508-status.sh | 4 ++-- > t/t9138-git-svn-authors-prog.sh | 4 ++-- > t/t9200-git-cvsexportcommit.sh | 3 +-- > t/t9400-git-cvsserver-server.sh | 5 +++-- > t/t9401-git-cvsserver-crlf.sh | 4 ++-- > t/t9402-git-cvsserver-refs.sh | 4 ++-- > t/t9902-completion.sh | 2 +- > t/test-lib-functions.sh | 12 ++++++++---- > t/test-lib.sh | 8 ++++++-- > 19 files changed, 78 insertions(+), 58 deletions(-) > > which does match what is contained in this topic.
I knew it was a bad idea to not also run tests on GitHub Actions :) I'll do that before the next reroll.
Anyway, looking at the failing test t9501, I assume that Perl isn't able to enable the DATE_PARSER prerequisite. So something like the below patch might hopefully fix it.
Thanks!
Patrick
diff --git a/t/t9501-gitweb-standalone-http-status.sh b/t/t9501-gitweb-standalone-http-status.sh index 32814e75df..3acb58125b 100755 --- a/t/t9501-gitweb-standalone-http-status.sh +++ b/t/t9501-gitweb-standalone-http-status.sh @@ -15,12 +15,12 @@ export GIT_TEST_DEFAULT_INITIAL_BRANCH_NAME . ./lib-gitweb.sh -# # Gitweb only provides the functionality tested by the 'modification times' # tests if it can access a date parser from one of these modules: -# -perl -MHTTP::Date -e 0 >/dev/null 2>&1 && test_set_prereq DATE_PARSER -perl -MTime::ParseDate -e 0 >/dev/null 2>&1 && test_set_prereq DATE_PARSER +test_lazy_prereq DATE_PARSER ' + perl -MHTTP::Date -e 0 || + perl -MTime::ParseDate -e 0 +' # ---------------------------------------------------------------------- # snapshot settings