[postgis-tickets] [SCM] PostGIS branch master updated. 3.4.0rc1-73-gf0cd8881b

git at osgeo.org git at osgeo.org
Tue Aug 29 15:36:43 PDT 2023


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, master has been updated
       via  f0cd8881bdaf19e0a3b083b0707791997ef9a16a (commit)
       via  bcf92c7d707d6930b5a6efb0016c391025755933 (commit)
      from  08aaa880ac8ce4ccd6e8c6eb62f851691ec65385 (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 f0cd8881bdaf19e0a3b083b0707791997ef9a16a
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Aug 30 00:28:11 2023 +0200

    Add check-double-upgrade and check-locked-upgrade make targets
    
    The double-upgrade test can catch the bug reported in #5494
    The locked-upgrade can catch many yet-unfixed bugs like #5499
    
    Neither of these tests are currently automatically
    run by 'make check'

diff --git a/regress/runtest.mk b/regress/runtest.mk
index c051f0379..7ec77bf13 100644
--- a/regress/runtest.mk
+++ b/regress/runtest.mk
@@ -38,3 +38,15 @@ check-regress:
 check-long:
 	$(PERL) $(top_srcdir)/regress/run_test.pl $(RUNTESTFLAGS) $(TESTS) $(TESTS_SLOW)
 
+
+.PHONY: check-double-upgrade
+check-double-upgrade:
+	$(MAKE) check-regress \
+    RUNTESTFLAGS='$(RUNTESTFLAGS) --upgrade --upgrade' \
+    TESTS=$(top_srcdir)/regress/core/regress.sql
+
+.PHONY: check-locked-upgrade
+check-locked-upgrade:
+	$(MAKE) check-regress \
+    RUNTESTFLAGS="$(RUNTESTFLAGS) --upgrade --before-upgrade-script regress/hooks/use-all-functions.sql" \
+    TESTS=$(top_srcdir)/regress/core/regress.sql

commit bcf92c7d707d6930b5a6efb0016c391025755933
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Aug 30 00:26:22 2023 +0200

    Allow requesting multiple upgrades to run_test.pl
    
    Pass multiple --upgrade switches to upgrade multiple times.
    It can be used to trigger bugs with still-existing functions
    being marked as deprecated.
    
    References #5494

diff --git a/regress/run_test.pl b/regress/run_test.pl
index cb391df4c..0b502b6fe 100755
--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -98,7 +98,7 @@ GetOptions (
 	'verbose+' => \$VERBOSE,
 	'clean' => \$OPT_CLEAN,
 	'nodrop' => \$OPT_NODROP,
-	'upgrade' => \$OPT_UPGRADE,
+	'upgrade+' => \$OPT_UPGRADE,
 	'upgrade-path=s' => \$OPT_UPGRADE_PATH,
 	'dumprestore' => \$OPT_DUMPRESTORE,
 	'nocreate' => \$OPT_NOCREATE,
@@ -433,7 +433,8 @@ if ( $OPT_DUMPRESTORE )
 
 if ( $OPT_UPGRADE )
 {
-    print "Upgrading from postgis $libver\n";
+    my $upgradesleft = $OPT_UPGRADE;
+    print "Upgrading from postgis $libver ($upgradesleft upgrades requested)\n";
 
     foreach my $hook (@OPT_HOOK_BEFORE_UPGRADE)
     {
@@ -441,13 +442,16 @@ if ( $OPT_UPGRADE )
         die unless load_sql_file($hook, 1);
     }
 
-    if ( $OPT_EXTENSIONS )
+    while ( $upgradesleft-- )
     {
-        die unless upgrade_spatial_extensions();
-    }
-    else
-    {
-        die unless upgrade_spatial();
+        if ( $OPT_EXTENSIONS )
+        {
+            die unless upgrade_spatial_extensions();
+        }
+        else
+        {
+            die unless upgrade_spatial();
+        }
     }
 
     foreach my $hook (@OPT_HOOK_AFTER_UPGRADE)
@@ -687,7 +691,8 @@ Usage: $0 [<options>] <testname> [<testname>]
 Options:
   -v, --verbose   be verbose about failures
   --nocreate      do not create the regression database on start
-  --upgrade       source the upgrade scripts on start
+  --upgrade       upgrade db before runnign tests, can be passed
+                  multiple times to perform multiple upgrades.
   --upgrade-path  upgrade path, format <from>--<to>.
                   <from> can be specified as "unpackaged<version>"
                          to specify a script version to start from.

-----------------------------------------------------------------------

Summary of changes:
 regress/run_test.pl | 23 ++++++++++++++---------
 regress/runtest.mk  | 12 ++++++++++++
 2 files changed, 26 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list