From: | Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
Cc: | Robert Haas <robertmhaas(at)gmail(dot)com>, Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Very confusing installcheck behavior with PGXS |
Date: | 2016-01-07 14:50:50 |
Message-ID: | 568E7B4A.4080003@BlueTreble.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 1/7/16 8:47 AM, Tom Lane wrote:
> Jim Nasby <Jim(dot)Nasby(at)BlueTreble(dot)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(at)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(at)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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2016-01-07 15:01:40 | pgsql: Windows: Make pg_ctl reliably detect service status |
Previous Message | Tom Lane | 2016-01-07 14:47:01 | Re: Very confusing installcheck behavior with PGXS |