Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 04163ff

Browse files
committed
Support vpath builds in TAP tests
1 parent 93787ce commit 04163ff

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/Makefile.global.in

+2-2
Original file line numberDiff line numberDiff line change
@@ -301,13 +301,13 @@ PG_PROVE_FLAGS = --ext='.pl' -I $(top_srcdir)/src/test/perl/
301301
PROVE_FLAGS = --verbose
302302

303303
define prove_installcheck
304-
PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS)
304+
cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS)
305305
endef
306306

307307
define prove_check
308308
$(MKDIR_P) tmp_check/log
309309
$(MAKE) -C $(top_builddir) DESTDIR=$(CURDIR)/tmp_check/install install >$(CURDIR)/tmp_check/log/install.log 2>&1
310-
PATH="$(CURDIR)/tmp_check/install$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS)
310+
cd $(srcdir) && TESTDIR='$(CURDIR)' PATH="$(CURDIR)/tmp_check/install$(bindir):$$PATH" PGPORT='6$(DEF_PGPORT)' $(PROVE) $(PG_PROVE_FLAGS) $(PROVE_FLAGS)
311311
endef
312312

313313
# Installation.

src/test/perl/TestLib.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ $ENV{PGPORT} = int($ENV{PGPORT}) % 65536;
6262

6363
sub tempdir
6464
{
65-
return File::Temp::tempdir('testXXXX', DIR => cwd(), CLEANUP => 1);
65+
return File::Temp::tempdir('tmp_testXXXX', DIR => $ENV{TESTDIR} || cwd(), CLEANUP => 1);
6666
}
6767

6868
my ($test_server_datadir, $test_server_logfile);

0 commit comments

Comments
 (0)