Skip to content

Commit

Permalink
Add a temp-install prerequisite to "check"-like targets not having one.
Browse files Browse the repository at this point in the history
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 dcae5fa introduced the
shared temp-install.
  • Loading branch information
nmisch committed Nov 6, 2017
1 parent 8135c3c commit 937f678
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions src/interfaces/ecpg/test/Makefile
Expand Up @@ -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 sql/twophase

# 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
Expand All @@ -95,5 +95,5 @@ installcheck: all
installcheck-prepared-txns: all
./pg_regress $(REGRESS_OPTS) --bindir='$(bindir)' $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule sql/twophase

check-prepared-txns: all
check-prepared-txns: 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 sql/twophase
1 change: 1 addition & 0 deletions src/test/locale/Makefile
Expand Up @@ -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
4 changes: 2 additions & 2 deletions src/test/modules/brin/Makefile
Expand Up @@ -21,13 +21,13 @@ endif

check: isolation-check prove-check

isolation-check: | submake-isolation
isolation-check: | submake-isolation temp-install
$(MKDIR_P) isolation_output
$(pg_isolation_regress_check) \
--outputdir=./isolation_output \
$(ISOLATIONCHECKS)

prove-check:
prove-check: | temp-install
$(prove_check)

.PHONY: check isolation-check prove-check
Expand Down
2 changes: 1 addition & 1 deletion src/test/modules/commit_ts/Makefile
Expand Up @@ -16,5 +16,5 @@ endif

check: prove-check

prove-check:
prove-check: | temp-install
$(prove_check)
2 changes: 1 addition & 1 deletion src/test/modules/test_pg_dump/Makefile
Expand Up @@ -21,5 +21,5 @@ endif

check: prove-check

prove-check:
prove-check: | temp-install
$(prove_check)
4 changes: 2 additions & 2 deletions src/test/regress/GNUmakefile
Expand Up @@ -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
Expand All @@ -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


Expand Down

0 comments on commit 937f678

Please sign in to comment.