summaryrefslogtreecommitdiff
path: root/src/test/modules
diff options
context:
space:
mode:
authorMichael Paquier <michael@paquier.xyz>2018-12-03 09:27:35 +0900
committerMichael Paquier <michael@paquier.xyz>2018-12-03 09:27:35 +0900
commitd3c09b9b1307e022883801000ae36bcb5eef71e8 (patch)
tree8f5233cf64fe8bd4ef37a5226d1f58860f3965ff /src/test/modules
parent29180e5d78e545472b1665b8d415e6917a5bf333 (diff)
Add PGXS options to control TAP and isolation tests, take two
The following options are added for extensions: - TAP_TESTS, to allow an extention to run TAP tests which are the ones present in t/*.pl. A subset of tests can always be run with the existing PROVE_TESTS for developers. - ISOLATION, to define a list of isolation tests. - ISOLATION_OPTS, to pass custom options to isolation_tester. A couple of custom Makefile rules have been accumulated across the tree to cover the lack of facility in PGXS for a couple of releases when using those test suites, which are all now replaced with the new flags, without reducing the test coverage. Note that tests of contrib/bloom/ are not enabled yet, as those are proving unstable in the buildfarm. Author: Michael Paquier Reviewed-by: Adam Berlin, Álvaro Herrera, Tom Lane, Nikolay Shaplov, Arthur Zakirov Discussion: https://postgr.es/m/20180906014849.GG2726@paquier.xyz
Diffstat (limited to 'src/test/modules')
-rw-r--r--src/test/modules/brin/.gitignore2
-rw-r--r--src/test/modules/brin/Makefile25
-rw-r--r--src/test/modules/commit_ts/Makefile7
-rw-r--r--src/test/modules/snapshot_too_old/Makefile35
-rw-r--r--src/test/modules/test_pg_dump/Makefile6
5 files changed, 15 insertions, 60 deletions
diff --git a/src/test/modules/brin/.gitignore b/src/test/modules/brin/.gitignore
index 62bbe8f6b1a..44f600cb6c7 100644
--- a/src/test/modules/brin/.gitignore
+++ b/src/test/modules/brin/.gitignore
@@ -1,3 +1,3 @@
# Generated subdirectories
-/isolation_output/
+/output_iso/
/tmp_check/
diff --git a/src/test/modules/brin/Makefile b/src/test/modules/brin/Makefile
index 566655cd61d..c8715939060 100644
--- a/src/test/modules/brin/Makefile
+++ b/src/test/modules/brin/Makefile
@@ -1,12 +1,9 @@
# src/test/modules/brin/Makefile
-# Note: because we don't tell the Makefile there are any regression tests,
-# we have to clean those result files explicitly
-EXTRA_CLEAN = $(pg_regress_clean_files) ./isolation_output
+EXTRA_INSTALL = contrib/pageinspect
-EXTRA_INSTALL=contrib/pageinspect
-
-ISOLATIONCHECKS=summarization-and-inprogress-insertion
+ISOLATION = summarization-and-inprogress-insertion
+TAP_TESTS = 1
ifdef USE_PGXS
PG_CONFIG = pg_config
@@ -18,19 +15,3 @@ top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
-
-check: isolation-check prove-check
-
-isolation-check: | submake-isolation temp-install
- $(MKDIR_P) isolation_output
- $(pg_isolation_regress_check) \
- --outputdir=./isolation_output \
- $(ISOLATIONCHECKS)
-
-prove-check: | temp-install
- $(prove_check)
-
-.PHONY: check isolation-check prove-check
-
-submake-isolation:
- $(MAKE) -C $(top_builddir)/src/test/isolation all
diff --git a/src/test/modules/commit_ts/Makefile b/src/test/modules/commit_ts/Makefile
index 6a9c3971fbc..113bcfa210b 100644
--- a/src/test/modules/commit_ts/Makefile
+++ b/src/test/modules/commit_ts/Makefile
@@ -6,6 +6,8 @@ REGRESS_OPTS = --temp-config=$(top_srcdir)/src/test/modules/commit_ts/commit_ts.
# which typical installcheck users do not have (e.g. buildfarm clients).
NO_INSTALLCHECK = 1
+TAP_TESTS = 1
+
ifdef USE_PGXS
PG_CONFIG = pg_config
PGXS := $(shell $(PG_CONFIG) --pgxs)
@@ -16,8 +18,3 @@ top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
-
-check: prove-check
-
-prove-check: | temp-install
- $(prove_check)
diff --git a/src/test/modules/snapshot_too_old/Makefile b/src/test/modules/snapshot_too_old/Makefile
index b6d998f3207..dfb4537f63c 100644
--- a/src/test/modules/snapshot_too_old/Makefile
+++ b/src/test/modules/snapshot_too_old/Makefile
@@ -4,7 +4,12 @@
# we have to clean those result files explicitly
EXTRA_CLEAN = $(pg_regress_clean_files)
-ISOLATIONCHECKS=sto_using_cursor sto_using_select sto_using_hash_index
+ISOLATION = sto_using_cursor sto_using_select sto_using_hash_index
+ISOLATION_OPTS = --temp-config $(top_srcdir)/src/test/modules/snapshot_too_old/sto.conf
+
+# Disabled because these tests require "old_snapshot_threshold" >= 0, which
+# typical installcheck users do not have (e.g. buildfarm clients).
+NO_INSTALLCHECK = 1
ifdef USE_PGXS
PG_CONFIG = pg_config
@@ -17,31 +22,7 @@ include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
-# Disabled because these tests require "old_snapshot_threshold" >= 0, which
-# typical installcheck users do not have (e.g. buildfarm clients).
-installcheck:;
-
# But it can nonetheless be very helpful to run tests on preexisting
# installation, allow to do so, but only if requested explicitly.
-installcheck-force: isolationcheck-install-force
-
-check: isolationcheck
-
-submake-isolation:
- $(MAKE) -C $(top_builddir)/src/test/isolation all
-
-submake-test_snapshot_too_old:
- $(MAKE) -C $(top_builddir)/src/test/modules/snapshot_too_old
-
-isolationcheck: | submake-isolation submake-test_snapshot_too_old temp-install
- $(pg_isolation_regress_check) \
- --temp-config $(top_srcdir)/src/test/modules/snapshot_too_old/sto.conf \
- $(ISOLATIONCHECKS)
-
-isolationcheck-install-force: all | submake-isolation submake-test_snapshot_too_old temp-install
- $(pg_isolation_regress_installcheck) \
- $(ISOLATIONCHECKS)
-
-.PHONY: check submake-test_snapshot_too_old isolationcheck isolationcheck-install-force
-
-temp-install: EXTRA_INSTALL=src/test/modules/snapshot_too_old
+installcheck-force:
+ $(pg_isolation_regress_installcheck) $(ISOLATION)
diff --git a/src/test/modules/test_pg_dump/Makefile b/src/test/modules/test_pg_dump/Makefile
index c64b3537072..6123b994f60 100644
--- a/src/test/modules/test_pg_dump/Makefile
+++ b/src/test/modules/test_pg_dump/Makefile
@@ -7,6 +7,7 @@ EXTENSION = test_pg_dump
DATA = test_pg_dump--1.0.sql
REGRESS = test_pg_dump
+TAP_TESTS = 1
ifdef USE_PGXS
PG_CONFIG = pg_config
@@ -18,8 +19,3 @@ top_builddir = ../../../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
-
-check: prove-check
-
-prove-check: | temp-install
- $(prove_check)