Allow make check in PL directories
Also add make check-world target, and refactor pg_regress invocation code in makefiles a bit.
This commit is contained in:
parent
0d90dc16f8
commit
2fd77060a2
|
@ -60,6 +60,9 @@ check: all
|
||||||
check installcheck installcheck-parallel:
|
check installcheck installcheck-parallel:
|
||||||
$(MAKE) -C src/test $@
|
$(MAKE) -C src/test $@
|
||||||
|
|
||||||
|
# TODO: add contrib
|
||||||
|
$(call recurse,check-world,src/test src/pl src/interfaces/ecpg,check)
|
||||||
|
|
||||||
$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib,installcheck)
|
$(call recurse,installcheck-world,src/test src/pl src/interfaces/ecpg contrib,installcheck)
|
||||||
|
|
||||||
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
|
GNUmakefile: GNUmakefile.in $(top_builddir)/config.status
|
||||||
|
@ -121,4 +124,4 @@ distcheck: dist
|
||||||
rm -rf $(distdir) $(dummy)
|
rm -rf $(distdir) $(dummy)
|
||||||
@echo "Distribution integrity checks out."
|
@echo "Distribution integrity checks out."
|
||||||
|
|
||||||
.PHONY: dist distdir distcheck docs install-docs world install-world installcheck-world
|
.PHONY: dist distdir distcheck docs install-docs world check-world install-world installcheck-world
|
||||||
|
|
2
Makefile
2
Makefile
|
@ -11,7 +11,7 @@
|
||||||
# GNUmakefile won't exist yet, so we catch that case as well.
|
# GNUmakefile won't exist yet, so we catch that case as well.
|
||||||
|
|
||||||
|
|
||||||
all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world install-world installcheck-world:
|
all check install installdirs installcheck installcheck-parallel uninstall clean distclean maintainer-clean dist distcheck world check-world install-world installcheck-world:
|
||||||
@if [ ! -f GNUmakefile ] ; then \
|
@if [ ! -f GNUmakefile ] ; then \
|
||||||
echo "You need to run the 'configure' program first. See the file"; \
|
echo "You need to run the 'configure' program first. See the file"; \
|
||||||
echo "'INSTALL' for installation instructions." ; \
|
echo "'INSTALL' for installation instructions." ; \
|
||||||
|
|
|
@ -285,9 +285,6 @@ XGETTEXT = @XGETTEXT@
|
||||||
GZIP = gzip
|
GZIP = gzip
|
||||||
BZIP2 = bzip2
|
BZIP2 = bzip2
|
||||||
|
|
||||||
PL_TESTDB = pl_regression
|
|
||||||
CONTRIB_TESTDB = contrib_regression
|
|
||||||
|
|
||||||
# Installation.
|
# Installation.
|
||||||
|
|
||||||
INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c
|
INSTALL = $(SHELL) $(top_srcdir)/config/install-sh -c
|
||||||
|
@ -426,6 +423,19 @@ submake-libpgport:
|
||||||
.PHONY: submake-libpq submake-libpgport
|
.PHONY: submake-libpq submake-libpgport
|
||||||
|
|
||||||
|
|
||||||
|
##########################################################################
|
||||||
|
#
|
||||||
|
# Testing support
|
||||||
|
|
||||||
|
PL_TESTDB = pl_regression
|
||||||
|
CONTRIB_TESTDB = contrib_regression
|
||||||
|
|
||||||
|
pg_regress_check = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --temp-install=./tmp_check --top-builddir=$(top_builddir)
|
||||||
|
pg_regress_installcheck = $(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR)
|
||||||
|
|
||||||
|
pg_regress_clean_files = results/ regression.diffs regression.out tmp_check/ log/
|
||||||
|
|
||||||
|
|
||||||
##########################################################################
|
##########################################################################
|
||||||
#
|
#
|
||||||
# Customization
|
# Customization
|
||||||
|
|
|
@ -231,8 +231,7 @@ ifdef EXTRA_CLEAN
|
||||||
endif
|
endif
|
||||||
ifdef REGRESS
|
ifdef REGRESS
|
||||||
# things created by various check targets
|
# things created by various check targets
|
||||||
rm -rf results tmp_check log
|
rm -rf $(pg_regress_clean_files)
|
||||||
rm -f regression.diffs regression.out regress.out run_check.out
|
|
||||||
ifeq ($(PORTNAME), win)
|
ifeq ($(PORTNAME), win)
|
||||||
rm -f regress.def
|
rm -f regress.def
|
||||||
endif
|
endif
|
||||||
|
@ -280,12 +279,11 @@ endif
|
||||||
|
|
||||||
# against installed postmaster
|
# against installed postmaster
|
||||||
installcheck: submake
|
installcheck: submake
|
||||||
$(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
|
$(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
# in-tree test doesn't work yet (no way to install my shared library)
|
# in-tree test doesn't work yet (no way to install my shared library)
|
||||||
#check: all submake
|
#check: all submake
|
||||||
# $(top_builddir)/src/test/regress/pg_regress --temp-install \
|
# $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
|
||||||
# --top-builddir=$(top_builddir) $(REGRESS_OPTS) $(REGRESS)
|
|
||||||
check:
|
check:
|
||||||
@echo "'make check' is not supported."
|
@echo "'make check' is not supported."
|
||||||
@echo "Do 'make install', then 'make installcheck' instead."
|
@echo "Do 'make install', then 'make installcheck' instead."
|
||||||
|
|
|
@ -4,4 +4,6 @@
|
||||||
/plperl_opmask.h
|
/plperl_opmask.h
|
||||||
|
|
||||||
# Generated subdirectories
|
# Generated subdirectories
|
||||||
|
/log/
|
||||||
/results/
|
/results/
|
||||||
|
/tmp_check/
|
||||||
|
|
|
@ -76,8 +76,11 @@ installdirs: installdirs-lib
|
||||||
|
|
||||||
uninstall: uninstall-lib
|
uninstall: uninstall-lib
|
||||||
|
|
||||||
|
check: submake
|
||||||
|
$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
installcheck: submake
|
installcheck: submake
|
||||||
$(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
|
$(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
.PHONY: submake
|
.PHONY: submake
|
||||||
submake:
|
submake:
|
||||||
|
@ -85,8 +88,7 @@ submake:
|
||||||
|
|
||||||
clean distclean maintainer-clean: clean-lib
|
clean distclean maintainer-clean: clean-lib
|
||||||
rm -f SPI.c Util.c $(OBJS) perlchunks.h plperl_opmask.h
|
rm -f SPI.c Util.c $(OBJS) perlchunks.h plperl_opmask.h
|
||||||
rm -rf results
|
rm -rf $(pg_regress_clean_files)
|
||||||
rm -f regression.diffs regression.out
|
|
||||||
|
|
||||||
else # can't build
|
else # can't build
|
||||||
|
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
# Generated subdirectories
|
# Generated subdirectories
|
||||||
|
/log/
|
||||||
/results/
|
/results/
|
||||||
|
/tmp_check/
|
||||||
|
|
|
@ -120,13 +120,19 @@ prep3:
|
||||||
clean3:
|
clean3:
|
||||||
rm -rf python3/
|
rm -rf python3/
|
||||||
|
|
||||||
|
check: submake prep3
|
||||||
|
$(pg_regress_check) --inputdir=./python3 --outputdir=./python3 $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
installcheck: submake prep3
|
installcheck: submake prep3
|
||||||
$(top_builddir)/src/test/regress/pg_regress --inputdir=./python3 --outputdir=./python3 --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
|
$(pg_regress_installcheck) --inputdir=./python3 --outputdir=./python3 $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
clean: clean3
|
clean: clean3
|
||||||
else
|
else
|
||||||
|
check: submake
|
||||||
|
$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
installcheck: submake
|
installcheck: submake
|
||||||
$(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
|
$(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
.PHONY: submake
|
.PHONY: submake
|
||||||
|
@ -135,8 +141,7 @@ submake:
|
||||||
|
|
||||||
clean distclean maintainer-clean: clean-lib
|
clean distclean maintainer-clean: clean-lib
|
||||||
rm -f $(OBJS)
|
rm -f $(OBJS)
|
||||||
rm -rf results
|
rm -rf $(pg_regress_clean_files)
|
||||||
rm -f regression.diffs regression.out
|
|
||||||
ifeq ($(PORTNAME), win32)
|
ifeq ($(PORTNAME), win32)
|
||||||
rm -f python${pytverstr}.def
|
rm -f python${pytverstr}.def
|
||||||
endif
|
endif
|
||||||
|
|
|
@ -1,2 +1,4 @@
|
||||||
# Generated subdirectories
|
# Generated subdirectories
|
||||||
|
/log/
|
||||||
/results/
|
/results/
|
||||||
|
/tmp_check/
|
||||||
|
|
|
@ -58,8 +58,11 @@ installdirs: installdirs-lib
|
||||||
uninstall: uninstall-lib
|
uninstall: uninstall-lib
|
||||||
$(MAKE) -C modules $@
|
$(MAKE) -C modules $@
|
||||||
|
|
||||||
|
check: submake
|
||||||
|
$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
installcheck: submake
|
installcheck: submake
|
||||||
$(top_builddir)/src/test/regress/pg_regress --inputdir=$(srcdir) --psqldir=$(PSQLDIR) $(REGRESS_OPTS) $(REGRESS)
|
$(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
|
||||||
|
|
||||||
.PHONY: submake
|
.PHONY: submake
|
||||||
submake:
|
submake:
|
||||||
|
@ -77,6 +80,5 @@ endif # TCL_SHARED_BUILD = 0
|
||||||
|
|
||||||
clean distclean maintainer-clean: clean-lib
|
clean distclean maintainer-clean: clean-lib
|
||||||
rm -f $(OBJS)
|
rm -f $(OBJS)
|
||||||
rm -rf results
|
rm -rf $(pg_regress_clean_files)
|
||||||
rm -f regression.diffs regression.out
|
|
||||||
$(MAKE) -C modules $@
|
$(MAKE) -C modules $@
|
||||||
|
|
|
@ -138,19 +138,19 @@ tablespace-setup:
|
||||||
## Run tests
|
## Run tests
|
||||||
##
|
##
|
||||||
|
|
||||||
pg_regress_call = ./pg_regress --inputdir=$(srcdir) --dlpath=. $(if $(MULTIBYTE),--multibyte=$(MULTIBYTE)) $(NOLOCALE)
|
REGRESS_OPTS = --dlpath=. $(if $(MULTIBYTE),--multibyte=$(MULTIBYTE)) $(NOLOCALE)
|
||||||
|
|
||||||
check: all tablespace-setup
|
check: all tablespace-setup
|
||||||
$(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF) $(EXTRA_TESTS)
|
$(pg_regress_check) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(TEMP_CONF) $(EXTRA_TESTS)
|
||||||
|
|
||||||
installcheck: all tablespace-setup
|
installcheck: all tablespace-setup
|
||||||
$(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule $(EXTRA_TESTS)
|
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/serial_schedule $(EXTRA_TESTS)
|
||||||
|
|
||||||
installcheck-parallel: all tablespace-setup
|
installcheck-parallel: all tablespace-setup
|
||||||
$(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS)
|
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS)
|
||||||
|
|
||||||
standbycheck: all
|
standbycheck: all
|
||||||
$(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/standby_schedule --use-existing
|
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/standby_schedule --use-existing
|
||||||
|
|
||||||
# old interfaces follow...
|
# old interfaces follow...
|
||||||
|
|
||||||
|
@ -159,10 +159,10 @@ runtest: installcheck
|
||||||
runtest-parallel: installcheck-parallel
|
runtest-parallel: installcheck-parallel
|
||||||
|
|
||||||
bigtest: all tablespace-setup
|
bigtest: all tablespace-setup
|
||||||
$(pg_regress_call) --psqldir=$(PSQLDIR) --schedule=$(srcdir)/serial_schedule numeric_big
|
$(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/serial_schedule numeric_big
|
||||||
|
|
||||||
bigcheck: all tablespace-setup
|
bigcheck: all tablespace-setup
|
||||||
$(pg_regress_call) --temp-install=./tmp_check --top-builddir=$(top_builddir) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) numeric_big
|
$(pg_regress_check) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) numeric_big
|
||||||
|
|
||||||
|
|
||||||
##
|
##
|
||||||
|
@ -176,5 +176,4 @@ clean distclean maintainer-clean: clean-lib
|
||||||
# things created by various check targets
|
# things created by various check targets
|
||||||
rm -f $(output_files) $(input_files)
|
rm -f $(output_files) $(input_files)
|
||||||
rm -rf testtablespace
|
rm -rf testtablespace
|
||||||
rm -rf results tmp_check log
|
rm -rf $(pg_regress_clean_files)
|
||||||
rm -f regression.diffs regression.out regress.out run_check.out
|
|
||||||
|
|
|
@ -2094,7 +2094,7 @@ regression_main(int argc, char *argv[], init_function ifunc, test_function tfunc
|
||||||
/* "make install" */
|
/* "make install" */
|
||||||
#ifndef WIN32_ONLY_COMPILER
|
#ifndef WIN32_ONLY_COMPILER
|
||||||
snprintf(buf, sizeof(buf),
|
snprintf(buf, sizeof(buf),
|
||||||
SYSTEMQUOTE "\"%s\" -C \"%s\" DESTDIR=\"%s/install\" install with_perl=no with_python=no > \"%s/log/install.log\" 2>&1" SYSTEMQUOTE,
|
SYSTEMQUOTE "\"%s\" -C \"%s\" DESTDIR=\"%s/install\" install > \"%s/log/install.log\" 2>&1" SYSTEMQUOTE,
|
||||||
makeprog, top_builddir, temp_install, outputdir);
|
makeprog, top_builddir, temp_install, outputdir);
|
||||||
#else
|
#else
|
||||||
snprintf(buf, sizeof(buf),
|
snprintf(buf, sizeof(buf),
|
||||||
|
|
Loading…
Reference in New Issue