]> granicus.if.org Git - postgresql/blob - contrib/test_decoding/Makefile
Fix and improve cache invalidation logic for logical decoding.
[postgresql] / contrib / test_decoding / Makefile
1 # contrib/test_decoding/Makefile
2
3 MODULES = test_decoding
4 PGFILEDESC = "test_decoding - example of a logical decoding output plugin"
5
6 # Note: because we don't tell the Makefile there are any regression tests,
7 # we have to clean those result files explicitly
8 EXTRA_CLEAN = $(pg_regress_clean_files) ./regression_output ./isolation_output
9
10 ifdef USE_PGXS
11 PG_CONFIG = pg_config
12 PGXS := $(shell $(PG_CONFIG) --pgxs)
13 include $(PGXS)
14 else
15 subdir = contrib/test_decoding
16 top_builddir = ../..
17 include $(top_builddir)/src/Makefile.global
18 include $(top_srcdir)/contrib/contrib-global.mk
19 endif
20
21 # Disabled because these tests require "wal_level=logical", which
22 # typical installcheck users do not have (e.g. buildfarm clients).
23 installcheck:;
24
25 # But it can nonetheless be very helpful to run tests on preexisting
26 # installation, allow to do so, but only if requested explicitly.
27 installcheck-force: regresscheck-install-force isolationcheck-install-force
28
29 check: regresscheck isolationcheck
30
31 submake-regress:
32         $(MAKE) -C $(top_builddir)/src/test/regress all
33
34 submake-isolation:
35         $(MAKE) -C $(top_builddir)/src/test/isolation all
36
37 submake-test_decoding:
38         $(MAKE) -C $(top_builddir)/contrib/test_decoding
39
40 REGRESSCHECKS=ddl rewrite toast permissions decoding_in_xact decoding_into_rel binary prepared
41
42 regresscheck: all | submake-regress submake-test_decoding
43         $(MKDIR_P) regression_output
44         $(pg_regress_check) \
45             --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \
46             --temp-install=./tmp_check \
47             --extra-install=contrib/test_decoding \
48             --outputdir=./regression_output \
49             $(REGRESSCHECKS)
50
51 regresscheck-install-force: | submake-regress submake-test_decoding
52         $(pg_regress_installcheck) \
53             --extra-install=contrib/test_decoding \
54             $(REGRESSCHECKS)
55
56 ISOLATIONCHECKS=mxact delayed_startup ondisk_startup concurrent_ddl_dml
57
58 isolationcheck: all | submake-isolation submake-test_decoding
59         $(MKDIR_P) isolation_output
60         $(pg_isolation_regress_check) \
61             --temp-config $(top_srcdir)/contrib/test_decoding/logical.conf \
62             --extra-install=contrib/test_decoding \
63             --outputdir=./isolation_output \
64             $(ISOLATIONCHECKS)
65
66 isolationcheck-install-force: all | submake-isolation submake-test_decoding
67         $(pg_isolation_regress_installcheck) \
68             --extra-install=contrib/test_decoding \
69             $(ISOLATIONCHECKS)
70
71 PHONY: submake-test_decoding submake-regress check \
72         regresscheck regresscheck-install-force \
73         isolationcheck isolationcheck-install-force