Commit ebe700d5 authored by Sandro Santilli's avatar Sandro Santilli

Add -s switch to check_all_upgrades to stop on first failure

Also have Dronie use that switch.
Closes #4360

git-svn-id: http://svn.osgeo.org/postgis/trunk@17363 b70326c6-7e19-0410-871a-916f4a2858ee
parent f06fea2f
Pipeline #54106969 passed with stage
in 23 minutes and 45 seconds
......@@ -24,7 +24,7 @@ steps:
- psql -c "select version()" template1
- make check RUNTESTFLAGS=-v
- make install
- utils/check_all_upgrades.sh
- utils/check_all_upgrades.sh -s
`grep '^POSTGIS_' Version.config | cut -d= -f2 | paste -sd '.'`
---
test-image: &test-image docker.kbt.io/postgis/build-test:trisquel2
......@@ -47,7 +47,7 @@ steps:
- psql -c "select version()" template1
- make check RUNTESTFLAGS=-v
- make install
- utils/check_all_upgrades.sh
- utils/check_all_upgrades.sh -s
`grep '^POSTGIS_' Version.config | cut -d= -f2 | paste -sd '.'`
---
test-image: &test-image docker.kbt.io/postgis/build-test:trisquel2
......@@ -70,6 +70,6 @@ steps:
- psql -c "select version()" template1
- make check RUNTESTFLAGS=-v
- make install
- utils/check_all_upgrades.sh
- utils/check_all_upgrades.sh -s
`grep '^POSTGIS_' Version.config | cut -d= -f2 | paste -sd '.'`
...
#!/bin/sh
if test -z "$1"; then
echo "Usage: $0 <to_version>" >&2
echo "Usage: $0 [-s] <to_version>" >&2
echo "Options:" >&2
echo "\t-s Stop on first failure" >&2
exit 1
fi
EXIT_ON_FIRST_FAILURE=0
if test "$1" = "-s"; then
EXIT_ON_FIRST_FAILURE=1
shift
fi
to_version="$1"
# Return -1, 1 or 0 if the first version
# is respectively smaller, greater or equal
# to the second version
......@@ -53,6 +62,9 @@ fi
echo "INFO: installed extensions: $INSTALLED_EXTENSIONS"
for EXT in ${INSTALLED_EXTENSIONS}; do
if test $EXIT_ON_FIRST_FAILURE != 0 -a $failures != 0; then
exit $failures
fi
if test "${EXT}" = "postgis"; then
REGDIR=${BUILDDIR}/regress
elif test "${EXT}" = "postgis_topology"; then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment