Re: tests for client programs - Mailing list pgsql-hackers

From Noah Misch
Subject Re: tests for client programs
Date
Msg-id 20140606015744.GC421700@tornado.leadboat.com
Whole thread Raw
In response to Re: tests for client programs  (Andres Freund <andres@2ndquadrant.com>)
Responses Re: tests for client programs
List pgsql-hackers
On Thu, Jun 05, 2014 at 10:57:03AM +0200, Andres Freund wrote:
> On 2014-06-04 20:40:40 -0400, Peter Eisentraut wrote:
> > On Wed, 2014-05-07 at 03:08 +0200, Andres Freund wrote:
> > > > As an additional issue it currently doesn't seem to work in VPATH
> > > > builds. That's imo a must fix.
> > > 
> > > A "cd $(srcdir) && .." in prove_installcheck and prove_check seems to do
> > > the trick.
> > 
> > Here is my proposed patch for this.
> 
> Except that I'd rather named CURDIR REGRESSDIR or such this looks sane.
> 
> >  sub tempdir
> >  {
> > -    return File::Temp::tempdir('testXXXX', DIR => cwd(), CLEANUP => 1);
> > +    return File::Temp::tempdir('testXXXX', DIR => $ENV{CURDIR} || cwd(), CLEANUP => 1);
> >  }

I recommend "TMPDIR => 1" instead of setting DIR.  This temporary directory is
used for Unix sockets, so path length limitations will be a problem:

http://www.postgresql.org/message-id/20140329172224.GA170273@tornado.leadboat.com

-- 
Noah Misch
EnterpriseDB                                 http://www.enterprisedb.com



pgsql-hackers by date:

Previous
From: Ali Akbar
Date:
Subject: Re: "pivot aggregation" with a patched intarray
Next
From: Tom Lane
Date:
Subject: Suppressing unused subquery output columns