[SCM] PostGIS branch stable-3.5 updated. 3.5.3-47-g99850668a
git at osgeo.org
git at osgeo.org
Wed Aug 27 03:33:54 PDT 2025
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, stable-3.5 has been updated
via 99850668ab2e7cd0b625fcf56dd31efb696dbac0 (commit)
via db451d23e1d259a1bbc05772c5be16d77bb8bd64 (commit)
from 91614bc55c1b2f561291780ccbea9d6a53aba509 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 99850668ab2e7cd0b625fcf56dd31efb696dbac0
Author: Sandro Santilli <strk at kbt.io>
Date: Wed Aug 27 12:33:09 2025 +0200
Make sure "make check" is unbuffered during upgrade checks
Fixes some cases of unexpected content in log file
diff --git a/utils/check_all_upgrades.sh b/utils/check_all_upgrades.sh
index 04471616d..db3ba0424 100755
--- a/utils/check_all_upgrades.sh
+++ b/utils/check_all_upgrades.sh
@@ -178,7 +178,7 @@ compatible_upgrade()
check_downgrade()
{
RUNTESTFLAGS="-v --extension --upgrade-path=${UPGRADE_PATH} ${USERTESTFLAGS}" \
- ${MAKE} -C ${REGDIR} check "TESTS=${SRCDIR}/regress/core/regress.sql" ${MAKE_ARGS} > ${TMPDIR}/log 2>&1
+ unbuffer ${MAKE} -C ${REGDIR} check "TESTS=${SRCDIR}/regress/core/regress.sql" ${MAKE_ARGS} > ${TMPDIR}/log 2>&1
if test $? = 0; then
echo "FAIL: ${test_label} did not error out:"
tail ${TMPDIR}/log
commit db451d23e1d259a1bbc05772c5be16d77bb8bd64
Author: Sandro Santilli <strk at kbt.io>
Date: Wed Aug 27 12:19:11 2025 +0200
Add downgrade testing
References #5977 in 3.5 branch (3.5.4dev)
diff --git a/utils/check_all_upgrades.sh b/utils/check_all_upgrades.sh
index ee01e344e..04471616d 100755
--- a/utils/check_all_upgrades.sh
+++ b/utils/check_all_upgrades.sh
@@ -135,6 +135,21 @@ kept_label()
return 0;
}
+# Usage: compatible_from <label> <from>
+compatible_from()
+{
+ label=$1
+ from=$2
+ cmp=`semver_compare "${PGIS_MIN_VERSION}" "${from}"`
+ if test $cmp -gt 0; then
+ echo "SKIP: $label ($from older than ${PGIS_MIN_VERSION}, which is required to run in PostgreSQL ${PGVER})"
+ return 1
+ fi
+
+ return 0
+}
+
+# Usage: compatible_upgrade <label> <from> <to>
compatible_upgrade()
{
label=$1
@@ -152,13 +167,32 @@ compatible_upgrade()
echo "SKIP: $label ($to is not newer than $from)"
return 1
fi
- cmp=`semver_compare "${PGIS_MIN_VERSION}" "${from}"`
- if test $cmp -gt 0; then
- echo "SKIP: $label ($from older than ${PGIS_MIN_VERSION}, which is required to run in PostgreSQL ${PGVER})"
+
+ if compatible_from $label $from; then
+ return 0
+ else
return 1
fi
+}
- return 0
+check_downgrade()
+{
+ RUNTESTFLAGS="-v --extension --upgrade-path=${UPGRADE_PATH} ${USERTESTFLAGS}" \
+ ${MAKE} -C ${REGDIR} check "TESTS=${SRCDIR}/regress/core/regress.sql" ${MAKE_ARGS} > ${TMPDIR}/log 2>&1
+ if test $? = 0; then
+ echo "FAIL: ${test_label} did not error out:"
+ tail ${TMPDIR}/log
+ failed
+ else
+ ERR=$( grep 'ERROR:.*Downgrade .* forbidden' ${TMPDIR}/log )
+ test -n "$ERR" && {
+ echo "PASS: ${test_label} gave $ERR"
+ } || {
+ echo "FAIL: ${test_label} gave some other error:"
+ tail ${TMPDIR}/log
+ failed
+ }
+ fi
}
report_missing_versions()
@@ -233,12 +267,26 @@ for EXT in ${INSTALLED_EXTENSIONS}; do #{
continue;
fi
UPGRADE_PATH="${from_version}--${to_version_param}"
- test_label="${EXT} extension upgrade ${UPGRADE_PATH}"
+
+ cmp=`semver_compare "${from_version}" "${to_version}"`
+ #echo "INFO: semver_compare ${from} ${to} returned $cmp"
+ if test $cmp -eq 0; then
+ echo "SKIP: ${from_version} -> ${to_version} (we won't test same-version upgrade/downgrade here)"
+ continue;
+ fi
+
+ if test $cmp -lt 0; then
+ test_label="${EXT} extension upgrade ${UPGRADE_PATH}"
+ else
+ test_label="${EXT} extension downgrade ${UPGRADE_PATH}"
+ fi
+
if expr $to_version_param : ':auto' >/dev/null; then
test_label="${test_label} ($to_version)"
fi
+
kept_label "${test_label}" || continue
- compatible_upgrade "${test_label}" ${from_version} ${to_version} || continue
+
path=$( psql -XAtc "
SELECT path
FROM pg_catalog.pg_extension_update_paths('${EXT}')
@@ -250,14 +298,30 @@ for EXT in ${INSTALLED_EXTENSIONS}; do #{
MISSING_EXT_UPGRADES="${from_version} ${MISSING_EXT_UPGRADES}"
continue
fi
+
+ compatible_from "${test_label}" ${from_version} || continue
+
echo "Testing ${test_label}"
- RUNTESTFLAGS="-v --extension --upgrade-path=${UPGRADE_PATH} ${USERTESTFLAGS}" \
- ${MAKE} -C ${REGDIR} check ${MAKE_ARGS} && {
- echo "PASS: ${test_label}"
- } || {
- echo "FAIL: ${test_label}"
- failed
- }
+
+ if expr "${test_label}" : '^.*upgrade' > /dev/null; then
+ RUNTESTFLAGS="-v --extension --upgrade-path=${UPGRADE_PATH} ${USERTESTFLAGS}" \
+ ${MAKE} -C ${REGDIR} check ${MAKE_ARGS} && {
+ echo "PASS: ${test_label}"
+ } || {
+ echo "FAIL: ${test_label}"
+ failed
+ }
+ else
+ check_downgrade
+
+ test_label="${test_label} with standard-conforming-strings off"
+ echo "Testing ${test_label}"
+ USERTESTFLAGS="\
+ ${USERTESTFLAGS} \
+ --before-upgrade-script ${SRCDIR}/regress/hooks/standard-conforming-strings-off.sql \
+ " check_downgrade
+ fi
+
done
if ! kept_label "unpackaged"; then
@@ -296,7 +360,7 @@ for EXT in ${INSTALLED_EXTENSIONS}; do #{
# Check unpackaged->unpackaged upgrades (if target version == current version)
# CURRENTVERSION=`grep '^POSTGIS_' ${SRCDIR}/Version.config | cut -d= -f2 | paste -sd '.'`
- CURRENTVERSION=$(grep '^POSTGIS_' ${SRCDIR}/Version.config | cut -d= -f2 | tr '\n' '.')
+ CURRENTVERSION=$(grep '^POSTGIS_' ${SRCDIR}/Version.config | cut -d= -f2 | tr '\n' '.' | sed 's/\.$//')
if test "${to_version}" != "${CURRENTVERSION}"; then #{
echo "SKIP: ${EXT} script-based upgrades (${to_version_param} [${to_version}] does not match built version ${CURRENTVERSION})"
-----------------------------------------------------------------------
Summary of changes:
utils/check_all_upgrades.sh | 92 ++++++++++++++++++++++++++++++++++++++-------
1 file changed, 78 insertions(+), 14 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list