summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Meskes <meskes@postgresql.org>2017-03-18 10:35:14 +0100
committerMichael Meskes <meskes@postgresql.org>2017-03-18 10:35:14 +0100
commit928250aef5f8363825acbf58540328089c26b0d4 (patch)
tree0a27e506ced303bdaa6b0c8b09e7628a4a5d3a64
parentf7819baa618c528f60e266874051563ecfe08207 (diff)
downloadpostgresql-928250aef5f8363825acbf58540328089c26b0d4.tar.gz
Fix schedule of ecpg test files to only try two-phase commit test when possible.
-rw-r--r--src/interfaces/ecpg/test/Makefile13
-rw-r--r--src/interfaces/ecpg/test/ecpg_schedule1
2 files changed, 12 insertions, 2 deletions
diff --git a/src/interfaces/ecpg/test/Makefile b/src/interfaces/ecpg/test/Makefile
index 28f02fea4f..73ac9e2ac0 100644
--- a/src/interfaces/ecpg/test/Makefile
+++ b/src/interfaces/ecpg/test/Makefile
@@ -78,7 +78,7 @@ endif
REGRESS_OPTS = --dbname=ecpg1_regression,ecpg2_regression --create-role=regress_ecpg_user1,regress_ecpg_user2 $(EXTRA_REGRESS_OPTS)
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
+ $(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
@@ -86,3 +86,14 @@ checktcp: all
installcheck: all
./pg_regress $(REGRESS_OPTS) --bindir='$(bindir)' $(pg_regress_locale_flags) $(THREAD) --schedule=$(srcdir)/ecpg_schedule
+
+# Versions of the check tests that include the twophase commit test.
+# It only makes sense to run these if set up to use prepared transactions,
+# via TEMP_CONFIG for the check case, or via the postgresql.conf for the
+# installcheck case.
+
+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
+ $(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
diff --git a/src/interfaces/ecpg/test/ecpg_schedule b/src/interfaces/ecpg/test/ecpg_schedule
index 206f712552..c3ec125c36 100644
--- a/src/interfaces/ecpg/test/ecpg_schedule
+++ b/src/interfaces/ecpg/test/ecpg_schedule
@@ -46,7 +46,6 @@ test: sql/indicators
test: sql/oldexec
test: sql/quote
test: sql/show
-test: sql/twophase
test: sql/insupd
test: sql/parser
test: thread/thread