Re: how to run encoding-dependent tests by default - Mailing list pgsql-hackers

From Tom Lane
Subject Re: how to run encoding-dependent tests by default
Date
Msg-id 15533.1564337527@sss.pgh.pa.us
Whole thread Raw
In response to Re: how to run encoding-dependent tests by default  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Responses Re: how to run encoding-dependent tests by default
Re: how to run encoding-dependent tests by default
List pgsql-hackers
Peter Eisentraut <peter.eisentraut@2ndquadrant.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



pgsql-hackers by date:

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