]> granicus.if.org Git - postgis/commitdiff
Keep running on failure, report all pass/fail/skip at the end
authorSandro Santilli <strk@kbt.io>
Sat, 7 Oct 2017 13:39:45 +0000 (13:39 +0000)
committerSandro Santilli <strk@kbt.io>
Sat, 7 Oct 2017 13:39:45 +0000 (13:39 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@15930 b70326c6-7e19-0410-871a-916f4a2858ee

utils/check_all_upgrades.sh

index 0872d77023f08866f5b46c319a23cc36aec62ed8..afc66ec71b7beff863c19705d88e558af49e7de1 100755 (executable)
@@ -10,18 +10,23 @@ BUILDDIR=$PWD
 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