Provide NO_INSTALLCHECK option for pgxs.
authorAndres Freund <[email protected]>
Mon, 14 Nov 2016 22:53:07 +0000 (14:53 -0800)
committerAndres Freund <[email protected]>
Mon, 14 Nov 2016 22:53:07 +0000 (14:53 -0800)
This allows us to avoid running the regression tests in contrib modules
like pg_stat_statement in a less ugly manner.

Discussion: <22432.1478968242@sss.pgh.pa.us>

contrib/pg_stat_statements/Makefile
doc/src/sgml/extend.sgml
src/makefiles/pgxs.mk

index f1a45eb17a8c9ececad4014fe41b0844be4b690a..298951a5f50030633b3e0ececae2835e5d45b64b 100644 (file)
@@ -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=
index e19c657d8febce16ecd9533769ff84fc7dcd1fbe..f9d91a39235ae441bc3252cab7b13da5455d3706 100644 (file)
@@ -1193,6 +1193,15 @@ include $(PGXS)
       </listitem>
      </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>
index 2b4d684e8e77e6b803ac810d8a0cd2658467f752..c27004ecfbe69d47689eb997f9ca1bcf1322cbfe 100644 (file)
@@ -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: