REGRESS_OPTS default

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-hackers(at)postgreSQL(dot)org
Subject: REGRESS_OPTS default
Date: 2011-08-24 01:17:19
Message-ID: 14108.1314148639@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

I got burnt tonight by the fact that the earthdistance contrib module
runs its regression test in database "regression", not
"contrib_regression" as I was expecting and as every other contrib
module does. The reason turns out to be that
earthdistance/Makefile does this:

REGRESS_OPTS = --extra-install=contrib/cube

while pgxs.mk does this:

# Calling makefile can set REGRESS_OPTS, but this is the default:
ifndef REGRESS_OPTS
REGRESS_OPTS = --dbname=$(CONTRIB_TESTDB)
endif

so of course the dbname provided here doesn't take effect and we fall
back to pg_regress' default.

There are at least two ways we could fix this: change
earthdistance/Makefile to do this:

REGRESS_OPTS = --extra-install=contrib/cube --dbname=$(CONTRIB_TESTDB)

or change pgxs.mk to do this:

REGRESS_OPTS += --dbname=$(CONTRIB_TESTDB)

I'm leaning towards the latter as being less prone to mistakes of
omission. If there's some reason for a pgxs-using makefile to override
the target DB name, it can set CONTRIB_TESTDB instead of messing with
REGRESS_OPTS.

Comments?

regards, tom lane

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Sushant Sinha 2011-08-24 01:28:41 Re: text search: restricting the number of parsed words in headline generation
Previous Message Tom Lane 2011-08-24 00:48:30 Another extensions bug