Skip to content

Commit ffa8c3d

Browse files
committed
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]>
1 parent c99f876 commit ffa8c3d

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

contrib/pg_stat_statements/Makefile

+3-4
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ LDFLAGS_SL += $(filter -lm, $(LIBS))
1313

1414
REGRESS_OPTS = --temp-config $(top_srcdir)/contrib/pg_stat_statements/pg_stat_statements.conf
1515
REGRESS = pg_stat_statements
16+
# Disabled because these tests require "shared_preload_libraries=pg_stat_statements",
17+
# which typical installcheck users do not have (e.g. buildfarm clients).
18+
NO_INSTALLCHECK = 1
1619

1720
ifdef USE_PGXS
1821
PG_CONFIG = pg_config
@@ -24,7 +27,3 @@ top_builddir = ../..
2427
include $(top_builddir)/src/Makefile.global
2528
include $(top_srcdir)/contrib/contrib-global.mk
2629
endif
27-
28-
# Disabled because these tests require "shared_preload_libraries=pg_stat_statements",
29-
# which typical installcheck users do not have (e.g. buildfarm clients).
30-
installcheck: REGRESS=

doc/src/sgml/extend.sgml

+9
Original file line numberDiff line numberDiff line change
@@ -1193,6 +1193,15 @@ include $(PGXS)
11931193
</listitem>
11941194
</varlistentry>
11951195

1196+
<varlistentry>
1197+
<term><varname>NO_INSTALLCHECK</varname></term>
1198+
<listitem>
1199+
<para>
1200+
don't define an installcheck target, useful e.g. if tests require special configuration, or don't use pg_regress
1201+
</para>
1202+
</listitem>
1203+
</varlistentry>
1204+
11961205
<varlistentry>
11971206
<term><varname>EXTRA_CLEAN</varname></term>
11981207
<listitem>

src/makefiles/pgxs.mk

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
# which need to be built first
4141
# REGRESS -- list of regression test cases (without suffix)
4242
# REGRESS_OPTS -- additional switches to pass to pg_regress
43+
# NO_INSTALLCHECK -- don't define an installcheck target, useful e.g. if
44+
# tests require special configuration, or don't use pg_regress
4345
# EXTRA_CLEAN -- extra files to remove in 'make clean'
4446
# PG_CPPFLAGS -- will be added to CPPFLAGS
4547
# PG_LIBS -- will be added to PROGRAM link line
@@ -268,8 +270,10 @@ ifndef PGXS
268270
endif
269271

270272
# against installed postmaster
273+
ifndef NO_INSTALLCHECK
271274
installcheck: submake $(REGRESS_PREP)
272275
$(pg_regress_installcheck) $(REGRESS_OPTS) $(REGRESS)
276+
endif
273277

274278
ifdef PGXS
275279
check:

0 commit comments

Comments
 (0)