Skip to content

Commit 6b04abd

Browse files
committed
Run tap tests in src/interfaces/libpq.
To be able to run binaries in the test/ directory, prove_[install]check need to be executable in a single shell invocation, so that test/ can be added to PATH. Discussion: https://postgr.es/m/20220223203031.ezrd73ohvjgfksow@alap3.anarazel.de
1 parent ac25173 commit 6b04abd

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

src/Makefile.global.in

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -448,8 +448,8 @@ ifeq ($(enable_tap_tests),yes)
448448

449449
ifndef PGXS
450450
define prove_installcheck
451-
rm -rf '$(CURDIR)'/tmp_check
452-
$(MKDIR_P) '$(CURDIR)'/tmp_check
451+
rm -rf '$(CURDIR)'/tmp_check && \
452+
$(MKDIR_P) '$(CURDIR)'/tmp_check && \
453453
cd $(srcdir) && \
454454
TESTDIR='$(CURDIR)' PATH="$(bindir):$(CURDIR):$$PATH" \
455455
PGPORT='6$(DEF_PGPORT)' top_builddir='$(CURDIR)/$(top_builddir)' \
@@ -458,8 +458,8 @@ cd $(srcdir) && \
458458
endef
459459
else # PGXS case
460460
define prove_installcheck
461-
rm -rf '$(CURDIR)'/tmp_check
462-
$(MKDIR_P) '$(CURDIR)'/tmp_check
461+
rm -rf '$(CURDIR)'/tmp_check && \
462+
$(MKDIR_P) '$(CURDIR)'/tmp_check && \
463463
cd $(srcdir) && \
464464
TESTDIR='$(CURDIR)' PATH="$(bindir):$(CURDIR):$$PATH" \
465465
PGPORT='6$(DEF_PGPORT)' top_builddir='$(top_builddir)' \
@@ -469,8 +469,8 @@ endef
469469
endif # PGXS
470470

471471
define prove_check
472-
rm -rf '$(CURDIR)'/tmp_check
473-
$(MKDIR_P) '$(CURDIR)'/tmp_check
472+
rm -rf '$(CURDIR)'/tmp_check && \
473+
$(MKDIR_P) '$(CURDIR)'/tmp_check && \
474474
cd $(srcdir) && \
475475
TESTDIR='$(CURDIR)' $(with_temp_install) PGPORT='6$(DEF_PGPORT)' \
476476
PG_REGRESS='$(CURDIR)/$(top_builddir)/src/test/regress/pg_regress' \

src/interfaces/libpq/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
/exports.list
22
/libpq-refs-stamp
3+
/tmp_check/

src/interfaces/libpq/Makefile

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,8 +137,14 @@ install: all installdirs install-lib
137137
$(INSTALL_DATA) $(srcdir)/pqexpbuffer.h '$(DESTDIR)$(includedir_internal)'
138138
$(INSTALL_DATA) $(srcdir)/pg_service.conf.sample '$(DESTDIR)$(datadir)/pg_service.conf.sample'
139139

140-
installcheck:
141-
$(MAKE) -C test $@
140+
test-build:
141+
$(MAKE) -C test all
142+
143+
check: test-build all
144+
PATH="$(CURDIR)/test:$$PATH" && $(prove_check)
145+
146+
installcheck: test-build all
147+
PATH="$(CURDIR)/test:$$PATH" && $(prove_installcheck)
142148

143149
installdirs: installdirs-lib
144150
$(MKDIR_P) '$(DESTDIR)$(includedir)' '$(DESTDIR)$(includedir_internal)' '$(DESTDIR)$(datadir)'
@@ -153,6 +159,7 @@ uninstall: uninstall-lib
153159

154160
clean distclean: clean-lib
155161
$(MAKE) -C test $@
162+
rm -rf tmp_check
156163
rm -f $(OBJS) pthread.h libpq-refs-stamp
157164
# Might be left over from a Win32 client-only build
158165
rm -f pg_config_paths.h

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy