Re: pg_upgrade automatic testing
Andrew Dunstan <andrew@dunslane.net>
From: Andrew Dunstan <andrew@dunslane.net>
To: Peter Eisentraut <peter_e@gmx.net>
Cc: Noah Misch <noah@leadboat.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2011-06-03T12:42:52Z
Lists: pgsql-hackers
On 05/25/2011 03:07 PM, Peter Eisentraut wrote:
> On ons, 2011-04-27 at 18:14 -0400, Noah Misch wrote:
>> Enthusiastic +1 for this concept. There's at least one rough edge: it fails if
>> you have another postmaster running on port 5432.
> This has now been addressed: pg_upgrade accepts PGPORT settings.
> Attached is a slightly updated patch runs the test suite with a port of
> 65432, which you can override by setting PGPORT yourself.
>
> Anyway, is this something that people want in the repository? It's not
> as polished as the pg_regress business, but it is definitely helpful.
As is, this will probably break on a bunch of platforms. I suspect you
will need the equivalent of this snippet from pg_regress.c:
add_to_path("LD_LIBRARY_PATH", ':', libdir);
add_to_path("DYLD_LIBRARY_PATH", ':', libdir);
add_to_path("LIBPATH", ':', libdir);
#if defined(WIN32)
add_to_path("PATH", ';', libdir);
#elif defined(__CYGWIN__)
add_to_path("PATH", ':', libdir);
#endif
For extra credit, you could create a subroutine in vcregress.pl to run
the check for MSVC builds.
cheers
andrew