Skip site navigation (1) Skip section navigation (2)

Re: pg_regress inputdir

From: Jorgen Austvik - Sun Norway <Jorgen(dot)Austvik(at)Sun(dot)COM>
To: Alvaro Herrera <alvherre(at)commandprompt(dot)com>
Cc: Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_regress inputdir
Date: 2008-07-30 08:35:24
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
Alvaro Herrera wrote:
> Jorgen Austvik - Sun Norway wrote:
>> The attached patch makes pg_regress write converted files to  
>> <inputdir>/sql and <inputdir>/expected, which is one way to make it read  
>> and write to the same directory. Tested on Solaris x86 with pgsql "make  
>> check" and standalone.
> I think this breaks VPATH builds in both letter and spirit. 


bash-3.2$ ggrep -R "\-\-inputdir" *
src/test/regress/pg_regress.c:  printf(_("  --inputdir=DIR 
take input files from DIR (default \".\")\n"));
Binary file src/test/regress/pg_regress.o matches
Binary file src/test/regress/pg_regress matches
Binary file 

Since it is not used in PostgreSQL build (only default value - "."), I 
have problems seeing how writing to e.g. "./sql/file" instead of writing 
to "sql/file" could break anything. Please explain.


Nobody has ever accuse me of being spiritual ;-), but if you have a URI 
that explains the VPATH spirit, I'd be interested to read about it.

 > Why do you need this anyway?

I tried to explain that in the first mail, but let me try again.

Use case:
Running pg_regress outside of PostgreSQL build system. pg_regress is 
installed in e.g. /usr/postgres/8.3/bin/, "input", "output", "sql" and 
"expected" are installed in some other path, e.g. 
/usr/postgres/8.3/share/test. User is in ~ and tries to run the 
PostgreSQL regression tests. It doesn't work, in fact the only way to 
make it work is to cd to the parent directory of "sql" and "expected".

Today, using --inputdir in pg_regress does not work for any other value 
than something that resolves to cwd, since it will write a file to 
"./sql", but try to read the same file from "<inputdir>/sql".


Jørgen Austvik, Software Engineering - QA
Sun Microsystems Database Group

Attachment: jorgen_austvik.vcf
Description: text/x-vcard (418 bytes)

In response to


pgsql-hackers by date

Next:From: Stephen R. van den BergDate: 2008-07-30 10:05:47
Subject: Re: Protocol 3, Execute, maxrows to return, impact?
Previous:From: Tatsuo IshiiDate: 2008-07-30 08:29:49
Subject: printing raw parse tree

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group