aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/isolation/Makefile3
-rw-r--r--src/test/perl/TestLib.pm1
-rw-r--r--src/test/regress/GNUmakefile4
-rw-r--r--src/test/regress/pg_regress.c6
4 files changed, 10 insertions, 4 deletions
diff --git a/src/test/isolation/Makefile b/src/test/isolation/Makefile
index c3c8280ea23..fbbbca05c51 100644
--- a/src/test/isolation/Makefile
+++ b/src/test/isolation/Makefile
@@ -10,6 +10,7 @@ top_builddir = ../../..
include $(top_builddir)/src/Makefile.global
override CPPFLAGS := -I$(srcdir) -I$(libpq_srcdir) -I$(srcdir)/../regress $(CPPFLAGS)
+LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils
OBJS = specparse.o isolationtester.o $(WIN32RES)
@@ -31,7 +32,7 @@ pg_regress.o: | submake-regress
pg_isolation_regress$(X): isolation_main.o pg_regress.o $(WIN32RES)
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
-isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport
+isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport submake-libpgfeutils
$(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
distprep: specparse.c specscanner.c
diff --git a/src/test/perl/TestLib.pm b/src/test/perl/TestLib.pm
index ce59401cefa..a164cdbd8ca 100644
--- a/src/test/perl/TestLib.pm
+++ b/src/test/perl/TestLib.pm
@@ -73,6 +73,7 @@ BEGIN
delete $ENV{PGUSER};
delete $ENV{PGPORT};
delete $ENV{PGHOST};
+ delete $ENV{PG_COLOR};
$ENV{PGAPPNAME} = basename($0);
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index a24cfd4e016..38fd25e5699 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -23,6 +23,8 @@ ifdef MAX_CONNECTIONS
MAXCONNOPT += --max-connections=$(MAX_CONNECTIONS)
endif
+LDFLAGS_INTERNAL += -L$(top_builddir)/src/fe_utils -lpgfeutils
+
# stuff to pass into build of pg_regress
EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \
'-DSHELLPROG="$(SHELL)"' \
@@ -36,7 +38,7 @@ EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \
all: pg_regress$(X)
-pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport
+pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport submake-libpgfeutils
$(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
# dependencies ensure that path changes propagate
diff --git a/src/test/regress/pg_regress.c b/src/test/regress/pg_regress.c
index 8111d95b1ea..189abbbdf37 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -33,6 +33,7 @@
#include "common/restricted_token.h"
#include "common/username.h"
+#include "fe_utils/logging.h"
#include "getopt_long.h"
#include "libpq/pqcomm.h" /* needed for UNIXSOCK_PATH() */
#include "pg_config_paths.h"
@@ -1174,7 +1175,7 @@ spawn_process(const char *cmdline)
cmdline2 = psprintf("cmd /c \"%s\"", cmdline);
if ((restrictedToken =
- CreateRestrictedProcess(cmdline2, &pi, progname)) == 0)
+ CreateRestrictedProcess(cmdline2, &pi)) == 0)
exit(2);
CloseHandle(pi.hThread);
@@ -2095,10 +2096,11 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
char buf[MAXPGPATH * 4];
char buf2[MAXPGPATH * 4];
+ pg_logging_init(argv[0]);
progname = get_progname(argv[0]);
set_pglocale_pgservice(argv[0], PG_TEXTDOMAIN("pg_regress"));
- get_restricted_token(progname);
+ get_restricted_token();
atexit(stop_postmaster);