Re: September 2015 Commitfest - Mailing list pgsql-hackers

From Tom Lane
Subject Re: September 2015 Commitfest
Date
Msg-id 5512.1446307738@sss.pgh.pa.us
Whole thread Raw
In response to Re: September 2015 Commitfest  (Nathan Wagner <nw+pg@hydaspes.if.org>)
Responses Re: September 2015 Commitfest  (Nathan Wagner <nw+pg@hydaspes.if.org>)
List pgsql-hackers
Nathan Wagner <nw+pg@hydaspes.if.org> writes:
> Second, it would be convenient if there were a make target that would
> set up a test environment.  Effectively do what the 'make check' does,
> but don't run the tests and leave the database up.  It should probably
> drop you into a shell that has the paths set up as well.  Another
> target should be available to shut it down.

As far as that goes, I don't think it's really the makefiles' place to
establish a manual-testing convention.  What I do, and what I think
most other longtimers do, is create test installations in nondefault
places.

It goes roughly like this:

./configure --with-pgport=5495 --prefix=/home/postgres/version95 ...
make -j8 -s
make -s install
export PATH="/home/postgres/version95/bin:$PATH"
export PGDATA=/home/postgres/version95/data
initdb
# optionally, adjust $PGDATA/postgresql.conf
pg_ctl start
make installcheck # optional
psql # and do whatever manual testing you want

to clean up:
pg_ctl stop
rm -rf /home/postgres/version95

I make a point of keeping around a test installation like this for
each supported PG branch, which is why I put major version numbers
into the installation paths and use per-version port numbers (so
that all these postmasters can be alive concurrently).  For one-off
testing against a modified version of HEAD you probably would not
want to bother with that; you just need to pick an installation
location that won't clobber your "real" installation, and not use
the standard PGPORT number.

You could imagine putting something into the standard makefiles
that did some subset of this, but I think it would be too rigid
to be useful.  As an example, what if you wanted to compare the
behaviors of both unmodified HEAD and your patched code?  It's
not very hard to set up two temporary installations along the
lines of the recipe I've just given, but I can't see the makefiles
handling that.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Nathan Wagner
Date:
Subject: Re: September 2015 Commitfest
Next
From: Nathan Wagner
Date:
Subject: Re: September 2015 Commitfest