Re: how to run encoding-dependent tests by default

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Andres Freund <andres(at)anarazel(dot)de>
Subject: Re: how to run encoding-dependent tests by default
Date: 2019-07-28 18:12:07
Message-ID: 15533.1564337527@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> writes:
>> Cool, that works out quite well. See attached patch. I flipped the
>> logic around to make it \quit if not compatible. That way the
>> alternative expected file is shorter and doesn't need to be updated all
>> the time. But it gets the job done either way.

I took a look at this and did some light testing. It seems to work
as advertised, but I do have one gripe, which is the dependency on
the EXTRA_TESTS mechanism. There are a few things not to like about
doing it that way:

* need additional hacking for Windows (admittedly, moot for
collate.linux.utf8, but I hope it's not for collate.icu.utf8).

* can't put these tests into a parallel group, they run by themselves;

* if user specifies EXTRA_TESTS on make command line, that overrides
the Makefile so these tests aren't run.

So I wish we could get rid of the Makefile changes, have the test
scripts be completely responsible for whether to run themselves or
not, and put them into the schedule files normally.

It's pretty obvious how we might do this for collate.icu.utf8:
make it look to see if there are any ICU-supplied collations in
pg_collation.

I'm less clear on a reasonable way to detect a glibc platform
from SQL. The best I can think of is to see if the string
"linux" appears in the output of version(), and that's probably
none too robust. Can we do anything based on the content of
pg_collation? Probably not :-(.

Still, even if you only fixed collate.icu.utf8 this way, that
would be a step forward since it would solve the Windows aspect.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2019-07-28 18:31:28 Re: how to run encoding-dependent tests by default
Previous Message Tom Lane 2019-07-28 17:37:07 Re: [PATCH] Add support for ON UPDATE/DELETE actions on ALTER CONSTRAINT