Add a temp-install prerequisite to "check"-like targets not having one.
authorNoah Misch <noah@leadboat.com>
Mon, 6 Nov 2017 02:51:08 +0000 (18:51 -0800)
committerNoah Misch <noah@leadboat.com>
Mon, 6 Nov 2017 02:52:38 +0000 (18:52 -0800)
Makefile.global assigns this prerequisite to every target named "check",
but similar targets must mention it explicitly.  Affected targets
failed, tested $PATH binaries, or tested a stale temporary installation.
The src/test/modules examples worked properly when called as "make -C
src/test/modules/$FOO check", but "make -j" allowed the test to start
before the temporary installation was in place.  Back-patch to 9.5,
where commit dcae5faccab64776376d354decda0017c648bb53 introduced the
shared temp-install.

src/interfaces/ecpg/test/Makefile
src/test/locale/Makefile
src/test/modules/brin/Makefile
src/test/modules/commit_ts/Makefile
src/test/modules/test_pg_dump/Makefile
src/test/regress/GNUmakefile

index 28f02fea4f7713ee769ff70aaf205af0135bbccd..22443b4a06eb54146995c43fdfb2091543df9042 100644 (file)
@@ -81,7 +81,7 @@ check: all
        $(with_temp_install) ./pg_regress $(REGRESS_OPTS) --temp-instance=./tmp_check $(TEMP_CONF) --bindir= $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule
 
 # the same options, but with --listen-on-tcp
-checktcp: all
+checktcp: all | temp-install
        $(with_temp_install) ./pg_regress $(REGRESS_OPTS) --temp-instance=./tmp_check $(TEMP_CONF) --bindir= $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule_tcp --host=localhost
 
 installcheck: all
index 26ec5c9a904c231e8636dc96834a5d9be191d15f..22a45b65f2c76bfdebfa1092b340dc16576a6d49 100644 (file)
@@ -16,5 +16,6 @@ clean distclean maintainer-clean:
                $(MAKE) -C $$d clean || exit; \
        done
 
+# These behave like installcheck targets.
 check-%: all
        @$(MAKE) -C `echo $@ | sed 's/^check-//'` test
index dda84c23c781d20441735b4e1a6c2b0e9316c3a0..2c51c6692485fd460e945acef51380cb83e74151 100644 (file)
@@ -18,7 +18,7 @@ endif
 
 check: isolation-check
 
-isolation-check: | submake-isolation
+isolation-check: | submake-isolation temp-install
        $(MKDIR_P) isolation_output
        $(pg_isolation_regress_check) \
            --outputdir=./isolation_output \
index 86b93b5e762920f1ed8e9b34e14bc69715439ca9..6d4f3be358e7c6d61709b2ebf7f8533bb2ef79e1 100644 (file)
@@ -16,5 +16,5 @@ endif
 
 check: prove-check
 
-prove-check:
+prove-check: | temp-install
        $(prove_check)
index 5050572777d7ce609d85fc63cad5c2d1071a08d6..c64b35370729ffbdbbe2f2b47f585d3dff1b5f2f 100644 (file)
@@ -21,5 +21,5 @@ endif
 
 check: prove-check
 
-prove-check:
+prove-check: | temp-install
        $(prove_check)
index 469b0937a23258eaf9b03d7ef68a9815a4b96734..587de56fb90a23746ec83e38151af967f9f0f159 100644 (file)
@@ -129,7 +129,7 @@ REGRESS_OPTS = --dlpath=. $(EXTRA_REGRESS_OPTS)
 check: all tablespace-setup
        $(pg_regress_check) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) $(EXTRA_TESTS)
 
-check-tests: all tablespace-setup
+check-tests: all tablespace-setup | temp-install
        $(pg_regress_check) $(REGRESS_OPTS) $(MAXCONNOPT) $(TESTS) $(EXTRA_TESTS)
 
 installcheck: all tablespace-setup
@@ -153,7 +153,7 @@ runtest-parallel: installcheck-parallel
 bigtest: all tablespace-setup
        $(pg_regress_installcheck) $(REGRESS_OPTS) --schedule=$(srcdir)/serial_schedule numeric_big
 
-bigcheck: all tablespace-setup
+bigcheck: all tablespace-setup | temp-install
        $(pg_regress_check) $(REGRESS_OPTS) --schedule=$(srcdir)/parallel_schedule $(MAXCONNOPT) numeric_big