[postgis-tickets] r14421 - Add check-installed-upgrades rule under extensions
Sandro Santilli
strk at keybit.net
Tue Nov 24 01:22:39 PST 2015
Author: strk
Date: 2015-11-24 01:22:39 -0800 (Tue, 24 Nov 2015)
New Revision: 14421
Modified:
trunk/extensions/upgradeable_versions.mk
Log:
Add check-installed-upgrades rule under extensions
The rule runs upgrade tests for all available extension
upgrade paths. Mostly fails, due to the features checked not
always being available in the installed versions of the extension,
but is a good starting point to improve the testing coverage.
Modified: trunk/extensions/upgradeable_versions.mk
===================================================================
--- trunk/extensions/upgradeable_versions.mk 2015-11-24 05:41:26 UTC (rev 14420)
+++ trunk/extensions/upgradeable_versions.mk 2015-11-24 09:22:39 UTC (rev 14421)
@@ -19,3 +19,29 @@
2.1.9 \
2.2.0 \
2.2.1
+
+check-installed-upgrades:
+ MODULE=$(EXTENSION); \
+ TOVER=$(EXTVERSION); \
+ EXDIR=`$(PG_CONFIG) --sharedir`/extension; \
+ echo MODULE=$${MODULE}; \
+ echo TOVER=$${TOVER}; \
+ echo EXDIR=$${EXDIR}; \
+ ls $${EXDIR}/$${MODULE}--*--$${TOVER}.sql \
+ | grep -v unpackaged \
+ | while read fname; do \
+ p=`echo "$${fname}" | sed "s/.*$${MODULE}--//;s/\.sql$$//"`; \
+ FROM=`echo $${p} | sed 's/--.*//'`; \
+ FF="$${EXDIR}/$${MODULE}--$${FROM}.sql"; \
+ if test -f "$${FF}"; then \
+ echo "Testing upgrade path $$p"; \
+ $(MAKE) -C ../.. installcheck \
+ RUNTESTFLAGS="-v --extension --upgrade-path $$p" \
+ || { \
+ echo "Upgrade path $$p failed FF=$${FF}"; \
+ exit 1; }; \
+ else \
+ echo "No install available for upgradeable ext version $${FROM}"; \
+ fi; \
+ done; \
+
More information about the postgis-tickets
mailing list