Re: tests fail on windows with default git settings

Andrew Dunstan <andrew@dunslane.net>

From: Andrew Dunstan <andrew@dunslane.net>
To: Nazir Bilal Yavuz <byavuz81@gmail.com>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Dave Page <dpage@pgadmin.org>, Andres Freund <andres@anarazel.de>, pgsql-hackers@postgresql.org
Date: 2024-07-11T13:56:41Z
Lists: pgsql-hackers
On 2024-07-11 Th 7:29 AM, Andrew Dunstan wrote:
>
> On 2024-07-11 Th 4:59 AM, Nazir Bilal Yavuz wrote:
>> Hi,
>>
>> On Wed, 10 Jul 2024 at 17:04, Andrew Dunstan <andrew@dunslane.net> 
>> wrote:
>>>
>>> On 2024-07-10 We 9:25 AM, Tom Lane wrote:
>>>> Dave Page <dpage@pgadmin.org> writes:
>>>>> On Wed, 10 Jul 2024 at 12:12, Andrew Dunstan <andrew@dunslane.net> 
>>>>> wrote:
>>>>>> As I was looking at this I wondered if there might be anywhere 
>>>>>> else that
>>>>>> needed adjustment. One thing that occurred to me was that that 
>>>>>> maybe we
>>>>>> should replace the use of "-w" in pg_regress.c with this rather less
>>>>>> dangerous flag, so instead of ignoring any white space difference 
>>>>>> we would
>>>>>> only ignore line end differences. The use of "-w" apparently 
>>>>>> dates back to
>>>>>> 2009.
>>>>> That seems like a good improvement to me.
>>>> +1
>>>>
>>>>
>>>
>>> OK, done.
>> It looks like Postgres CI did not like this change. 'Windows - Server
>> 2019, VS 2019 - Meson & ninja' [1] task started to fail after this
>> commit, there is one extra space at the end of line in regress test's
>> output.
>>
>> [1] https://cirrus-ci.com/task/6753781205958656
>>
>
> Oh, that's annoying. Will investigate. Thanks for the heads up.
>
>
>

I have reverted the pg_regress.c portion of the patch. I will 
investigate non line-end differences on Windows further.


cheers


andrew

--
Andrew Dunstan
EDB: https://www.enterprisedb.com




Commits

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

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