summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndres Freund2016-11-14 22:53:07 +0000
committerAndres Freund2016-11-14 22:53:07 +0000
commitffa8c3d8521bbd7c6da497264f1a12572a1ff713 (patch)
tree7f558af33568588a55b1052607c38381d2b690de
parentc99f876e9a1e2a9a04d02a8aaf046cd9125e9264 (diff)
Provide NO_INSTALLCHECK option for pgxs.
This allows us to avoid running the regression tests in contrib modules like pg_stat_statement in a less ugly manner. Discussion: <[email protected]>
-rw-r--r--contrib/pg_stat_statements/Makefile7
-rw-r--r--doc/src/sgml/extend.sgml9
-rw-r--r--src/makefiles/pgxs.mk4
3 files changed, 16 insertions, 4 deletions
diff --git a/contrib/pg_stat_statements/Makefile b/contrib/pg_stat_statements/Makefile
index f1a45eb17a..298951a5f5 100644
--- a/contrib/pg_stat_statements/Makefile
+++ b/contrib/pg_stat_statements/Makefile
@@ -13,6 +13,9 @@ LDFLAGS_SL += $(filter -lm, $(LIBS))
REGRESS_OPTS = --temp-config $(top_srcdir)/contrib/pg_stat_statements/pg_stat_statements.conf
REGRESS = pg_stat_statements
+# Disabled because these tests require "shared_preload_libraries=pg_stat_statements",
+# which typical installcheck users do not have (e.g. buildfarm clients).
+NO_INSTALLCHECK = 1
ifdef USE_PGXS
PG_CONFIG = pg_config
@@ -24,7 +27,3 @@ top_builddir = ../..
include $(top_builddir)/src/Makefile.global
include $(top_srcdir)/contrib/contrib-global.mk
endif
-
-# Disabled because these tests require "shared_preload_libraries=pg_stat_statements",
-# which typical installcheck users do not have (e.g. buildfarm clients).
-installcheck: REGRESS=
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index e19c657d8f..f9d91a3923 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -1194,6 +1194,15 @@ include $(PGXS)
</varlistentry>
<varlistentry>
+ <term><varname>NO_INSTALLCHECK</varname></term>
+ <listitem>
+ <para>
+ don't define an installcheck target, useful e.g. if tests require special configuration, or don't use pg_regress
+ </para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term><varname>EXTRA_CLEAN</varname></term>
<listitem>
<para>
diff --git a/src/makefiles/pgxs.mk b/src/makefiles/pgxs.mk
index 2b4d684e8e..c27004ecfb 100644
--- a/src/makefiles/pgxs.mk
+++ b/src/makefiles/pgxs.mk
@@ -40,6 +40,8 @@
# which need to be built first
# REGRESS -- list of regression test cases (without suffix)
# REGRESS_OPTS -- additional switches to pass to pg_regress
+# NO_INSTALLCHECK -- don't define an installcheck target, useful e.g. if
+# tests require special configuration, or don't use pg_regress
# EXTRA_CLEAN -- extra files to remove in 'make clean'
# PG_CPPFLAGS -- will be added to CPPFLAGS
# PG_LIBS -- will be added to PROGRAM link line
@@ -268,8 +270,10 @@ ifndef PGXS
endif
# against installed postmaster
+ifndef NO_INSTALLCHECK
installcheck: submake $(REGRESS_PREP)
$(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
+endif
ifdef PGXS
check: