Re: multi-platform, multi-locale regression tests

Lists: pgsql-hackers
From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-hackers(at)postgresql(dot)org
Subject: multi-platform, multi-locale regression tests
Date: 2010-11-09 20:18:29
Message-ID: 1289333909.20422.15.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

I'm looking for some ideas on how to deal with the regression tests for
the per-column collation feature. These are the issues:

* The feature only works on some platforms (tentatively: Linux,
Windows).

-> Possible solution: like xml test

* The locale names are platform dependent, so there would need to be
different test files per locale.

* The test files need to use some non-ASCII characters. So far, I have
encoded the test file in UTF-8 and run the tests with make check
MULTIBYTE=UTF8.

* Also, the allowed collations depend on the server encoding, so any
solution for the previous point that results in the server encoding of
the test database being variable will make the setup of the regression
test SQL file more interesting.

* Of course the actual sort orders could also be different on different
platforms, but that problem can likely be contained.

One possible way out is not to include these tests in the main test set
and instead require manual invocation.

Better ideas?


From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Peter Eisentraut <peter_e(at)gmx(dot)net>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: multi-platform, multi-locale regression tests
Date: 2010-11-09 22:00:29
Message-ID: D5CB8701-02E8-4FE9-9075-2478BBEBEAA3@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Nov 9, 2010, at 12:18 PM, Peter Eisentraut wrote:

> One possible way out is not to include these tests in the main test set
> and instead require manual invocation.
>
> Better ideas?

I've been talking to Nasby and Dunstan about adding a Test::More/pgTAP-based test suite to the core. It wouldn't run with the usual core suite used by developers, which would continue to use pg_regress. But they could run it if they wanted (and had the prerequisites), and the build farm animals would run them regularly.

The nice thing about using a TAP-based framework is that you can skip tests that don't meet platform requirements, and compare values within the tests, right where you write them, rather than in a separate file. You can also dynamically change how you compare things depending on the environment, such as the locales that vary on different platforms.

Thoughts?

Best,

David


From: Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: multi-platform, multi-locale regression tests
Date: 2010-11-09 22:42:32
Message-ID: AANLkTi=BjJW+E2WaZro2MarDn_B-Vw0zGGLpqgDM_P0m@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

2010/11/9 David E. Wheeler <david(at)kineticode(dot)com>:
> On Nov 9, 2010, at 12:18 PM, Peter Eisentraut wrote:
>
>> One possible way out is not to include these tests in the main test set
>> and instead require manual invocation.
>>
>> Better ideas?
>
> I've been talking to Nasby and Dunstan about adding a Test::More/pgTAP-based test suite to the core. It wouldn't run with the usual core suite used by developers, which would continue to use pg_regress. But they could run it if they wanted (and had the prerequisites), and the build farm animals would run them regularly.
>
> The nice thing about using a TAP-based framework is that you can skip tests that don't meet platform requirements, and compare values within the tests, right where you write them, rather than in a separate file. You can also dynamically change how you compare things depending on the environment, such as the locales that vary on different platforms.
>
> Thoughts?

Are you thinking of a contrib module 'pgtap' that we can use to
accomplish the optionnal regression tests ?

--
Cédric Villemain               2ndQuadrant
http://2ndQuadrant.fr/     PostgreSQL : Expertise, Formation et Support


From: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
To: Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: multi-platform, multi-locale regression tests
Date: 2010-11-09 22:44:36
Message-ID: 3FC6CDB2-0BD8-4E58-83C2-C782EC8F1553@kineticode.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On Nov 9, 2010, at 2:42 PM, Cédric Villemain wrote:

> Are you thinking of a contrib module 'pgtap' that we can use to
> accomplish the optionnal regression tests ?

Oh, if the project wants it in contrib, sure. Otherwise I'd probably just have the test stuff include it somehow.

David


From: Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: multi-platform, multi-locale regression tests
Date: 2010-11-09 22:54:41
Message-ID: AANLkTi=tx8DQMoUKzsxiGKzVWYgMu1ea9H8+NzTjn=B2@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

2010/11/9 David E. Wheeler <david(at)kineticode(dot)com>:
> On Nov 9, 2010, at 2:42 PM, Cédric Villemain wrote:
>
>> Are you thinking of a contrib module 'pgtap' that we can use to
>> accomplish the optionnal regression tests ?
>
> Oh, if the project wants it in contrib, sure. Otherwise I'd probably just have the test stuff include it somehow.

Adding a unit test layer shipped with postgresql sounds good to me.
And pgTAP can claim to be platform agnostic.

--
Cédric Villemain               2ndQuadrant
http://2ndQuadrant.fr/     PostgreSQL : Expertise, Formation et Support


From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: "David E(dot) Wheeler" <david(at)kineticode(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: multi-platform, multi-locale regression tests
Date: 2010-11-10 04:18:29
Message-ID: 1289362709.12124.1.camel@vanquo.pezone.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-hackers

On tis, 2010-11-09 at 14:00 -0800, David E. Wheeler wrote:
> I've been talking to Nasby and Dunstan about adding a Test::More/pgTAP-based test suite to the core. It wouldn't run with the usual core suite used by developers, which would continue to use pg_regress. But they could run it if they wanted (and had the prerequisites), and the build farm animals would run them regularly.

I'd welcome something like that, but I'm not sure that that's the best
overall solution to this particular problem in the short run. But it
would be great to have anyway.