Fix parallel make risk with new check temp-install setup

The "check" target no longer needs to depend on "all", because it now
runs "install" directly, which in turn depends on "all".  Doing both
will cause problems with parallel make, because two builds will run next
to each other.

Also remove the redirection of the temp-install output into a log file.
This was appropriate when this was done from within pg_regress, but now
it's just a regular make run, and especially with the above changes this
will now take the place of running the "all" target before the test
suites.

problem report by Jeff Janes, patch in part by Michael Paquier
This commit is contained in:
Peter Eisentraut 2015-04-29 20:34:22 -04:00
parent e0f26fc765
commit dbf2ec1a1c
14 changed files with 15 additions and 18 deletions

View File

@ -62,8 +62,6 @@ distclean maintainer-clean:
# Garbage from autoconf: # Garbage from autoconf:
@rm -rf autom4te.cache/ @rm -rf autom4te.cache/
check check-tests: all
check check-tests installcheck installcheck-parallel installcheck-tests: check check-tests installcheck installcheck-parallel installcheck-tests:
$(MAKE) -C src/test/regress $@ $(MAKE) -C src/test/regress $@

View File

@ -40,7 +40,7 @@ submake-test_decoding:
REGRESSCHECKS=ddl rewrite toast permissions decoding_in_xact decoding_into_rel \ REGRESSCHECKS=ddl rewrite toast permissions decoding_in_xact decoding_into_rel \
binary prepared replorigin binary prepared replorigin
regresscheck: all | submake-regress submake-test_decoding temp-install regresscheck: | submake-regress submake-test_decoding temp-install
$(MKDIR_P) regression_output $(MKDIR_P) regression_output
$(pg_regress_check) \ $(pg_regress_check) \
--temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \ --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \
@ -54,7 +54,7 @@ regresscheck-install-force: | submake-regress submake-test_decoding temp-install
ISOLATIONCHECKS=mxact delayed_startup ondisk_startup concurrent_ddl_dml ISOLATIONCHECKS=mxact delayed_startup ondisk_startup concurrent_ddl_dml
isolationcheck: all | submake-isolation submake-test_decoding temp-install isolationcheck: | submake-isolation submake-test_decoding temp-install
$(MKDIR_P) isolation_output $(MKDIR_P) isolation_output
$(pg_isolation_regress_check) \ $(pg_isolation_regress_check) \
--temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \ --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \

View File

@ -308,10 +308,9 @@ check: temp-install
temp-install: temp-install:
ifeq ($(MAKELEVEL),0) ifeq ($(MAKELEVEL),0)
rm -rf '$(abs_top_builddir)'/tmp_install rm -rf '$(abs_top_builddir)'/tmp_install
$(MKDIR_P) '$(abs_top_builddir)'/tmp_install/log $(MAKE) -C '$(top_builddir)' DESTDIR='$(abs_top_builddir)'/tmp_install install
$(MAKE) -C '$(top_builddir)' DESTDIR='$(abs_top_builddir)'/tmp_install install >'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1
endif endif
$(if $(EXTRA_INSTALL),for extra in $(EXTRA_INSTALL); do $(MAKE) -C '$(top_builddir)'/$$extra DESTDIR='$(abs_top_builddir)'/tmp_install install >>'$(abs_top_builddir)'/tmp_install/log/install.log 2>&1 || exit; done) $(if $(EXTRA_INSTALL),for extra in $(EXTRA_INSTALL); do $(MAKE) -C '$(top_builddir)'/$$extra DESTDIR='$(abs_top_builddir)'/tmp_install install || exit; done)
PROVE = @PROVE@ PROVE = @PROVE@
PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/ PG_PROVE_FLAGS = -I $(top_srcdir)/src/test/perl/

View File

@ -58,7 +58,7 @@ clean distclean maintainer-clean:
# ensure that changes in datadir propagate into object file # ensure that changes in datadir propagate into object file
initdb.o: initdb.c $(top_builddir)/src/Makefile.global initdb.o: initdb.c $(top_builddir)/src/Makefile.global
check: all check:
$(prove_check) $(prove_check)
installcheck: installcheck:

View File

@ -50,7 +50,7 @@ clean distclean maintainer-clean:
$(OBJS) $(OBJS)
rm -rf tmp_check rm -rf tmp_check
check: all check:
$(prove_check) $(prove_check)
installcheck: installcheck:

View File

@ -49,7 +49,7 @@ clean distclean maintainer-clean:
rm -f pg_config$(X) $(OBJS) rm -f pg_config$(X) $(OBJS)
rm -rf tmp_check rm -rf tmp_check
check: all check:
$(prove_check) $(prove_check)
installcheck: installcheck:

View File

@ -35,7 +35,7 @@ clean distclean maintainer-clean:
rm -f pg_controldata$(X) $(OBJS) rm -f pg_controldata$(X) $(OBJS)
rm -rf tmp_check rm -rf tmp_check
check: all check:
$(prove_check) $(prove_check)
installcheck: installcheck:

View File

@ -38,7 +38,7 @@ clean distclean maintainer-clean:
rm -f pg_ctl$(X) $(OBJS) rm -f pg_ctl$(X) $(OBJS)
rm -rf tmp_check rm -rf tmp_check
check: all check:
$(prove_check) $(prove_check)
installcheck: installcheck:

View File

@ -69,7 +69,7 @@ clean distclean maintainer-clean:
rm -f dumputils.c print.c mbprint.c kwlookup.c keywords.c rm -f dumputils.c print.c mbprint.c kwlookup.c keywords.c
rm -rf tmp_check rm -rf tmp_check
check: all check:
$(prove_check) $(prove_check)
installcheck: installcheck:

View File

@ -26,5 +26,5 @@ install-ecpglib-recurse: install-pgtypeslib-recurse
clean distclean maintainer-clean: clean distclean maintainer-clean:
$(MAKE) -C test clean $(MAKE) -C test clean
check checktcp installcheck: all check checktcp installcheck:
$(MAKE) -C test $@ $(MAKE) -C test $@

View File

@ -291,7 +291,7 @@ 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.'
else else
check: all submake $(REGRESS_PREP) check: submake $(REGRESS_PREP)
$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS) $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
temp-install: EXTRA_INSTALL+=$(subdir) temp-install: EXTRA_INSTALL+=$(subdir)

View File

@ -114,7 +114,7 @@ uninstall-data:
.PHONY: install-data uninstall-data .PHONY: install-data uninstall-data
check: all submake check: submake
$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS) $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
installcheck: submake installcheck: submake

View File

@ -141,7 +141,7 @@ uninstall-data:
include $(srcdir)/regress-python3-mangle.mk include $(srcdir)/regress-python3-mangle.mk
check: all submake check: submake
$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS) $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
installcheck: submake installcheck: submake

View File

@ -92,7 +92,7 @@ uninstall-data:
.PHONY: install-data uninstall-data .PHONY: install-data uninstall-data
check: all submake check: submake
$(pg_regress_check) $(REGRESS_OPTS) $(REGRESS) $(pg_regress_check) $(REGRESS_OPTS) $(REGRESS)
installcheck: submake installcheck: submake