summaryrefslogtreecommitdiff
path: root/src/interfaces/ecpg/test
diff options
context:
space:
mode:
authorDaniel Gustafsson2023-10-24 19:37:35 +0000
committerDaniel Gustafsson2023-10-24 19:37:35 +0000
commit66d6086cbcbfc8dee789a69bf56d967bf9607902 (patch)
treed3f0d171d50e605c13a9b12c6f360fb26c2ba349 /src/interfaces/ecpg/test
parent387f9ed0a0832760a709d27abd630002903e3459 (diff)
Speed up pg_regress server readiness testing.
Instead of connecting to the server with psql to check if it is ready for running tests, this changes pg_regress to use PQPing which avoids performing system() calls which are expensive on some platforms, like Windows. The frequency of tests is also increased in order to connect to the server faster. This patch is part of a larger effort to make testing consume fewer resources in order to be able to fit more tests into the available CI system constraints. Reviewed-by: Andres Freund <[email protected]> Discussion: https://postgr.es/m/[email protected]
Diffstat (limited to 'src/interfaces/ecpg/test')
-rw-r--r--src/interfaces/ecpg/test/Makefile3
-rw-r--r--src/interfaces/ecpg/test/meson.build2
2 files changed, 3 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/test/Makefile b/src/interfaces/ecpg/test/Makefile
index cf841a3a5b2..ba6ca837b35 100644
--- a/src/interfaces/ecpg/test/Makefile
+++ b/src/interfaces/ecpg/test/Makefile
@@ -10,6 +10,7 @@ include $(top_builddir)/src/Makefile.global
override CPPFLAGS := \
'-I$(top_builddir)/src/port' \
'-I$(top_srcdir)/src/test/regress' \
+ '-I$(libpq_srcdir)' \
'-DHOST_TUPLE="$(host_tuple)"' \
'-DSHELLPROG="$(SHELL)"' \
$(CPPFLAGS)
@@ -45,7 +46,7 @@ clean distclean maintainer-clean:
all: pg_regress$(X)
pg_regress$(X): pg_regress_ecpg.o $(WIN32RES) $(top_builddir)/src/test/regress/pg_regress.o
- $(CC) $(CFLAGS) $^ $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
+ $(CC) $(CFLAGS) $^ $(libpq_pgport) $(LDFLAGS) $(LDFLAGS_EX) $(LIBS) -o $@
$(top_builddir)/src/test/regress/pg_regress.o:
$(MAKE) -C $(dir $@) $(notdir $@)
diff --git a/src/interfaces/ecpg/test/meson.build b/src/interfaces/ecpg/test/meson.build
index 04c6819a799..b7a3fb4e0ea 100644
--- a/src/interfaces/ecpg/test/meson.build
+++ b/src/interfaces/ecpg/test/meson.build
@@ -18,7 +18,7 @@ pg_regress_ecpg = executable('pg_regress_ecpg',
pg_regress_ecpg_sources,
c_args: pg_regress_cflags,
include_directories: [pg_regress_inc, include_directories('.')],
- dependencies: [frontend_code],
+ dependencies: [frontend_code, libpq],
kwargs: default_bin_args + {
'install': false
},