Re: how to run encoding-dependent tests by default

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: how to run encoding-dependent tests by default
Дата
Msg-id 15533.1564337527@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: how to run encoding-dependent tests by default  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Ответы Re: how to run encoding-dependent tests by default  (Tom Lane <tgl@sss.pgh.pa.us>)
Re: how to run encoding-dependent tests by default  (Peter Eisentraut <peter.eisentraut@2ndquadrant.com>)
Список 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 по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [PATCH] Add support for ON UPDATE/DELETE actions on ALTER CONSTRAINT
Следующее
От: Tom Lane
Дата:
Сообщение: Re: how to run encoding-dependent tests by default