[postgis-tickets] r16915 - [check_all_upgrades] Enable topology and raster tests
Sandro Santilli
strk at kbt.io
Mon Oct 15 08:28:26 PDT 2018
Author: strk
Date: 2018-10-15 20:28:26 -0700 (Mon, 15 Oct 2018)
New Revision: 16915
Modified:
trunk/utils/check_all_upgrades.sh
Log:
[check_all_upgrades] Enable topology and raster tests
... rather than just core testing, this should now include
raster and topology.
Closes #4199
Modified: trunk/utils/check_all_upgrades.sh
===================================================================
--- trunk/utils/check_all_upgrades.sh 2018-10-15 13:11:46 UTC (rev 16914)
+++ trunk/utils/check_all_upgrades.sh 2018-10-16 03:28:26 UTC (rev 16915)
@@ -41,27 +41,49 @@
cd $EXTDIR
failures=0
-files=`'ls' postgis--* | grep -v -- '--.*--' | sed 's/^postgis--\(.*\)\.sql/\1/'`
-for fname in unpackaged $files; do
- from_version="$fname"
- # only consider versions older than ${to_version}
- cmp=`semver_compare "${from_version}" "${to_version}"`
- if test $cmp -ge 0; then
- continue
- fi
- 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 "PASS: upgrade $UPGRADE_PATH"
- } || {
- echo "FAIL: upgrade $UPGRADE_PATH"
- failures=$((failures+1))
- }
+
+INSTALLED_EXTENSIONS=postgis
+if test -f postgis_topology--${to_version}.sql; then
+ INSTALLED_EXTENSIONS="$INSTALLED_EXTENSIONS postgis_topology"
+fi
+if test -f postgis_raster--${to_version}.sql; then
+ INSTALLED_EXTENSIONS="$INSTALLED_EXTENSIONS postgis_raster"
+fi
+
+echo "INFO: installed extensions: $INSTALLED_EXTENSIONS"
+
+for EXT in ${INSTALLED_EXTENSIONS}; do
+ if test "${EXT}" = "postgis"; then
+ REGDIR=${BUILDDIR}/regress
+ elif test "${EXT}" = "postgis_topology"; then
+ REGDIR=${BUILDDIR}/topology/test
+ elif test "${EXT}" = "postgis_raster"; then
+ REGDIR=${BUILDDIR}/raster/test/regress
else
- echo "SKIP: upgrade $UPGRADE_PATH is missing"
+ echo "SKIP: don't know where to find regress tests for extension ${EXT}"
fi
+ files=`'ls' ${EXT}--* | grep -v -- '--.*--' | sed "s/^${EXT}--\(.*\)\.sql/\1/"`
+ for fname in unpackaged $files; do
+ from_version="$fname"
+ # only consider versions older than ${to_version}
+ cmp=`semver_compare "${from_version}" "${to_version}"`
+ if test $cmp -ge 0; then
+ continue
+ fi
+ UPGRADE_PATH="${from_version}--${to_version}"
+ if test -e ${EXT}--${UPGRADE_PATH}.sql; then
+ echo "Testing ${EXT} upgrade $UPGRADE_PATH"
+ export RUNTESTFLAGS="-v --extension --upgrade-path=${UPGRADE_PATH}"
+ make -C ${REGDIR} check && {
+ echo "PASS: upgrade $UPGRADE_PATH"
+ } || {
+ echo "FAIL: upgrade $UPGRADE_PATH"
+ failures=$((failures+1))
+ }
+ else
+ echo "SKIP: ${EXT} upgrade $UPGRADE_PATH is missing"
+ fi
+ done
done
exit $failures
More information about the postgis-tickets
mailing list