summaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTom Lane2019-05-14 18:19:49 +0000
committerTom Lane2019-05-14 18:20:10 +0000
commitfc9a62af3f87f4bec1e8c904ea99ae50f3c881ef (patch)
treea566ea096bbebc18e307370917e061d49f725291 /src/test
parentb71dad22ce8a645a47c01e544f640f35b91bfbd3 (diff)
Move logging.h and logging.c from src/fe_utils/ to src/common/.
The original placement of this module in src/fe_utils/ is ill-considered, because several src/common/ modules have dependencies on it, meaning that libpgcommon and libpgfeutils now have mutual dependencies. That makes it pointless to have distinct libraries at all. The intended design is that libpgcommon is lower-level than libpgfeutils, so only dependencies from the latter to the former are acceptable. We already have the precedent that fe_memutils and a couple of other modules in src/common/ are frontend-only, so it's not stretching anything out of whack to treat logging.c as a frontend-only module in src/common/. To the extent that such modules help provide a common frontend/backend environment for the rest of common/ to use, it's a reasonable design. (logging.c does not yet provide an ereport() emulation, but one can dream.) Hence, move these files over, and revert basically all of the build-system changes made by commit cc8d41511. There are no places that need to grow new dependencies on libpgcommon, further reinforcing the idea that this is the right solution. Discussion: https://postgr.es/m/a912ffff-f6e4-778a-c86a-cf5c47a12933@2ndquadrant.com
Diffstat (limited to 'src/test')
-rw-r--r--src/test/isolation/Makefile3
-rw-r--r--src/test/regress/GNUmakefile4
-rw-r--r--src/test/regress/pg_regress.c2
3 files changed, 3 insertions, 6 deletions
diff --git a/src/test/isolation/Makefile b/src/test/isolation/Makefile
index fbbbca05c51..c3c8280ea23 100644
--- a/src/test/isolation/Makefile
+++ b/src/test/isolation/Makefile
@@ -10,7 +10,6 @@ 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)
@@ -32,7 +31,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 submake-libpgfeutils
+isolationtester$(X): $(OBJS) | submake-libpq submake-libpgport
$(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
distprep: specparse.c specscanner.c
diff --git a/src/test/regress/GNUmakefile b/src/test/regress/GNUmakefile
index 38fd25e5699..a24cfd4e016 100644
--- a/src/test/regress/GNUmakefile
+++ b/src/test/regress/GNUmakefile
@@ -23,8 +23,6 @@ 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)"' \
@@ -38,7 +36,7 @@ EXTRADEFS = '-DHOST_TUPLE="$(host_tuple)"' \
all: pg_regress$(X)
-pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport submake-libpgfeutils
+pg_regress$(X): pg_regress.o pg_regress_main.o $(WIN32RES) | submake-libpgport
$(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 0902b1fa97a..a1a3d487482 100644
--- a/src/test/regress/pg_regress.c
+++ b/src/test/regress/pg_regress.c
@@ -31,9 +31,9 @@
#include "pg_regress.h"
+#include "common/logging.h"
#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"