Re: September 2015 Commitfest

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Nathan Wagner <nw+pg(at)hydaspes(dot)if(dot)org>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: September 2015 Commitfest
Date: 2015-10-31 16:08:58
Message-ID: 5512.1446307738@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Nathan Wagner <nw+pg(at)hydaspes(dot)if(dot)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

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Wagner 2015-10-31 16:19:53 Re: September 2015 Commitfest
Previous Message Nathan Wagner 2015-10-31 15:43:13 Re: September 2015 Commitfest