[postgis-tickets] r16928 - Have "installcheck" also test CREATE EXTENSION from unpackaged

Sandro Santilli strk at kbt.io
Thu Oct 18 11:30:58 PDT 2018


Author: strk
Date: 2018-10-18 23:30:58 -0700 (Thu, 18 Oct 2018)
New Revision: 16928

Modified:
   trunk/GNUmakefile.in
   trunk/raster/test/regress/Makefile.in
   trunk/regress/Makefile.in
   trunk/topology/test/Makefile.in
Log:
Have "installcheck" also test CREATE EXTENSION from unpackaged

Closes #4205

Modified: trunk/GNUmakefile.in
===================================================================
--- trunk/GNUmakefile.in	2018-10-18 22:36:34 UTC (rev 16927)
+++ trunk/GNUmakefile.in	2018-10-19 06:30:58 UTC (rev 16928)
@@ -9,6 +9,10 @@
 SUBDIRS += libpgcommon postgis regress @RASTER@ @TOPOLOGY@ loader utils doc @EXTENSIONS@
 endif
 
+POSTGIS_MAJOR_VERSION=@POSTGIS_MAJOR_VERSION@
+POSTGIS_MINOR_VERSION=@POSTGIS_MINOR_VERSION@
+POSTGIS_MICRO_VERSION=@POSTGIS_MICRO_VERSION@
+
 PERL = @PERL@
 
 # todo: add more rules here, like uninstall, clean...
@@ -45,9 +49,19 @@
 		grep -v postgis/sqldefines.h | \
 		xargs grep -n '[[:space:]]$$'
 
-installcheck:
+installcheck: installcheck-base installcheck-upgrade
+
+installcheck-base:
 	RUNTESTFLAGS="$(RUNTESTFLAGS) --extension" $(MAKE) check
 
+# only run upgrade test if RUNTESTFLAGS was not already doing that
+installcheck-upgrade:
+	if test -z `echo "$(RUNTESTFLAGS)" | grep -- --upgrade`; then \
+		RUNTESTFLAGS="$(RUNTESTFLAGS) --extension \
+			--upgrade-path unpackaged--$(POSTGIS_MAJOR_VERSION).$(POSTGIS_MINOR_VERSION).$(POSTGIS_MICRO_VERSION)" \
+			$(MAKE) check; \
+	fi
+
 distclean: distclean-local
 
 distclean-local: clean-local

Modified: trunk/raster/test/regress/Makefile.in
===================================================================
--- trunk/raster/test/regress/Makefile.in	2018-10-18 22:36:34 UTC (rev 16927)
+++ trunk/raster/test/regress/Makefile.in	2018-10-19 06:30:58 UTC (rev 16928)
@@ -181,6 +181,6 @@
 	$(MAKE) -C ../../../regress staged-install
 	$(PERL) ../../../regress/run_test.pl --raster $(RUNTESTFLAGS) $(TESTS)
 	# only run upgrade test if RUNTESTFLAGS was not already doing that
-	if test -z `echo "$(RUNTESTFLAGS)" | grep -- --upgrade`; then \
+	if echo "$(RUNTESTFLAGS)" | grep -vq -- --upgrade; then \
 		$(PERL) ../../../regress/run_test.pl --upgrade --raster $(RUNTESTFLAGS) $(TESTS); \
 	fi

Modified: trunk/regress/Makefile.in
===================================================================
--- trunk/regress/Makefile.in	2018-10-18 22:36:34 UTC (rev 16927)
+++ trunk/regress/Makefile.in	2018-10-19 06:30:58 UTC (rev 16928)
@@ -301,7 +301,7 @@
 test check: staged-install
 	$(PERL) run_test.pl $(RUNTESTFLAGS) $(SFCGALTESTFLAGS) $(TESTS)
 	# only run upgrade test if RUNTESTFLAGS was not already doing that
-	if test -z `echo "$(RUNTESTFLAGS)" | grep -- --upgrade`; then \
+	if echo "$(RUNTESTFLAGS)" | grep -vq -- --upgrade; then \
 		$(PERL) run_test.pl --upgrade $(RUNTESTFLAGS) $(SFCGALTESTFLAGS) $(TESTS); \
 	fi
 

Modified: trunk/topology/test/Makefile.in
===================================================================
--- trunk/topology/test/Makefile.in	2018-10-18 22:36:34 UTC (rev 16927)
+++ trunk/topology/test/Makefile.in	2018-10-19 06:30:58 UTC (rev 16928)
@@ -77,6 +77,6 @@
 	$(MAKE) -C ../../regress staged-install
 	$(PERL) ../../regress/run_test.pl --topology $(RUNTESTFLAGS) $(TESTS)
 	# only run upgrade test if RUNTESTFLAGS was not already doing that
-	if test -z `echo "$(RUNTESTFLAGS)" | grep -- --upgrade`; then \
+	if echo "$(RUNTESTFLAGS)" | grep -vq -- --upgrade; then \
 		$(PERL) ../../regress/run_test.pl --upgrade --topology $(RUNTESTFLAGS) $(TESTS); \
 	fi



More information about the postgis-tickets mailing list