Andrew Dunstan <andrew@dunslane.net> writes:
> On 08/11/2010 12:42 AM, Tom Lane wrote:
>> ... However, it does seem like we ought to be able to
>> do something about two buildfarm critters defaulting to the same choice
>> of port number.
> Why not just add the configured port (DEF_PGPORT) into the calculation
> of the port to run on?
No, that would be just about the worst possible choice. It'd be
guaranteed to fail in the standard scenario that you are running
"make check" before updating an existing installation.
I think what we want to do here is arrange for the buildfarm script to
select the same port that it's going to use later for an "installed"
postmaster, but it has to go via a different path than DEF_PGPORT.
The first thought that comes to mind is to adjust the makefiles
like this:
ifdef REGRESSION_TEST_PORT... add --port $(REGRESSION_TEST_PORT) to pg_regress flags ...endif
and then the buildfarm script could use
make REGRESSION_TEST_PORT=nnn check
But I'm not sure what the cleanest way is if we have to pass that
down from the top-level makefile. Make doesn't pass down variables
automatically does it?
Another possibility is to allow a regression test port number to
be configured via configure; though that seems like a slightly
larger change than I'd want to push into the back branches.
regards, tom lane