Re: tests fail on windows with default git settings

Andres Freund <andres@anarazel.de>

From: Andres Freund <andres@anarazel.de>
To: Andrew Dunstan <andrew@dunslane.net>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@postgresql.org, Dave Page <dpage@pgadmin.org>
Date: 2024-07-09T16:35:07Z
Lists: pgsql-hackers
Hi,

On 2024-07-09 06:26:12 -0400, Andrew Dunstan wrote:
> On 2024-07-08 Mo 5:44 PM, Andres Freund wrote:
> > > What I suggest (see attached) is we run the diff command with
> > > --strip-trailing-cr on Windows. Then we just won't care if the expected file
> > > and/or the output file has CRs.
> > I was wondering about that too, but I wasn't sure we can rely on that flag
> > being supported...
> > 
> 
> Well, my suggestion was to use it only on Windows. I'm using the diffutils
> from chocolatey, which has it, as does Msys2 diff. Not sure what you have in
> the CI setup.

IIRC it's git's, which in turn is based on msys/mingw.

Greetings,

Andres Freund



Commits

  1. Use diff --strip-trailing-cr in pg_regress.c

  2. Use diff's --strip-trailing-cr flag where appropriate on Windows