pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Jim Nasby <Jim.Nasby@BlueTreble.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Pg Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Very confusing installcheck behavior with PGXS
Date: Thu, 7 Jan 2016 08:50:50 -0600
Message-ID: <568E7B4A.4080003@BlueTreble.com> (raw)
In-Reply-To: <12108.1452178021@sss.pgh.pa.us>
References: <56899F36.9000607@BlueTreble.com>
	<CA+TgmoaKJFjY-=A6x3Qhk2Sf7egQG3=FdSUdzTCQtogYbBGyCQ@mail.gmail.com>
	<5651.1452102882@sss.pgh.pa.us>
	<568E7829.2050805@BlueTreble.com>
	<12108.1452178021@sss.pgh.pa.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>

On 1/7/16 8:47 AM, Tom Lane wrote:
> Jim Nasby <Jim.Nasby@BlueTreble.com> writes:
>> However, if I do this:
>> mv test/sql/acl_type.sql test/sql/acl.sql
>> mv test/expected/acl_type.out test/expected/acl.out
>
>> And change acl_type to acl in that pg_regress command:
>> /Users/decibel/pgsql/HEAD/i/lib/pgxs/src/makefiles/../../src/test/regress/pg_regress
>> --bindir='/Users/decibel/pgsql/HEAD/i/bin' --inputdir=test
>> --load-language=plpgsql --dbname=contrib_regression acl build compat rights
>
>> Instead of executing test/sql/acl.sql, it executes ./sql/acl.sql.
>
> That's pretty hard to believe.  There's nothing in pg_regress that looks
> in places other than the given --inputdir.

Actually, I think it does... from pg_regress_main.c:

	/*
	 * Look for files in the output dir first, consistent with a vpath search.
	 * This is mainly to create more reasonable error messages if the file is
	 * not found.  It also allows local test overrides when running pg_regress
	 * outside of the source tree.
	 */
	snprintf(infile, sizeof(infile), "%s/sql/%s.sql",
			 outputdir, testname);
	if (!file_exists(infile))
		snprintf(infile, sizeof(infile), "%s/sql/%s.sql",
				 inputdir, testname);

If I add --outputdir=test, then everything works fine.

Obviously I can just deal with this in my Makefile, but is this really 
the behavior we want? It certainly seems to violate POLA...

> I wonder whether you have a test/input/acl.sql and/or test/output/acl.out
> that's confusing matters.

Nope...

decibel@decina:[08:35]~/git/pg_acl (master *%=)$ll test
total 16
drwxr-x---   6 decibel  staff  204 Jan  2 17:31 ./
drwxr-x---  17 decibel  staff  578 Jan  7 08:35 ../
-rw-r-----   1 decibel  staff   65 Jan  2 17:31 deps.sql
drwxr-x---   6 decibel  staff  204 Jan  7 08:32 expected/
lrwxr-x---   1 decibel  staff   25 Dec 26 13:43 pgxntool@ -> 
../pgxntool/test/pgxntool
drwxr-x---   6 decibel  staff  204 Jan  7 08:32 sql/
decibel@decina:[08:48]~/git/pg_acl (master *%=)$


-- 
Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX
Experts in Analytics, Data Architecture and PostgreSQL
Data in Trouble? Get it in Treble! http://BlueTreble.com


-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers



view thread (18+ messages)  latest in thread

Message-ID: <568E7B4A.4080003@BlueTreble.com>
Permalink:  ../568E7B4A.4080003@BlueTreble.com/
Also on:    postgresql.org/message-id/568E7B4A.4080003@BlueTreble.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: Jim.Nasby@BlueTreble.com, tgl@sss.pgh.pa.us, robertmhaas@gmail.com
  Subject: Re: Very confusing installcheck behavior with PGXS
  In-Reply-To: <568E7B4A.4080003@BlueTreble.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox