[postgis-tickets] r15930 - Keep running on failure, report all pass/fail/skip at the end

Sandro Santilli strk at kbt.io
Sat Oct 7 06:39:45 PDT 2017


Author: strk
Date: 2017-10-07 06:39:45 -0700 (Sat, 07 Oct 2017)
New Revision: 15930

Modified:
   trunk/utils/check_all_upgrades.sh
Log:
Keep running on failure, report all pass/fail/skip at the end

Modified: trunk/utils/check_all_upgrades.sh
===================================================================
--- trunk/utils/check_all_upgrades.sh	2017-10-07 13:39:38 UTC (rev 15929)
+++ trunk/utils/check_all_upgrades.sh	2017-10-07 13:39:45 UTC (rev 15930)
@@ -10,18 +10,23 @@
 EXTDIR=`pg_config --sharedir`/extension/
 
 cd $EXTDIR
-'ls' postgis--* | grep -v -- '--.*--' |
-sed 's/^postgis--\(.*\)\.sql/\1/' | while read fname; do
+failures=0
+files=`'ls' postgis--* | grep -v -- '--.*--' | sed 's/^postgis--\(.*\)\.sql/\1/'`
+for fname in $files; do
   from_version="$fname"
   UPGRADE_PATH="${from_version}--${to_version}"
   if test -e postgis--${UPGRADE_PATH}.sql; then
     echo "Testing upgrade $UPGRADE_PATH"
     export RUNTESTFLAGS="-v --extension --upgrade-path=${UPGRADE_PATH}"
-    make -C ${BUILDDIR}/regress check || {
-      echo "Upgrade $UPGRADE_PATH failed" >&2
-      exit 1
+    make -C ${BUILDDIR}/regress check && {
+      echo "PASS: upgrade $UPGRADE_PATH"
+    } || {
+      echo "FAIL: upgrade $UPGRADE_PATH"
+      failures=$((failures+1))
     }
   else
-    echo "Missing script for $UPGRADE_PATH upgrade" >&2
+    echo "SKIP: upgrade $UPGRADE_PATH is missing"
   fi
 done
+
+exit $failures



More information about the postgis-tickets mailing list