[SCM] PostGIS branch master updated. 3.4.0rc1-716-g5739cacd9

git at osgeo.org git at osgeo.org
Fri Oct 27 01:47:30 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  5739cacd977d4917805a4485fa5f6b38dfce4d9a (commit)
      from  0ea22f44492e1495386f989146b678015e840549 (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 5739cacd977d4917805a4485fa5f6b38dfce4d9a
Author: Sandro Santilli <strk at kbt.io>
Date:   Fri Oct 27 09:43:29 2023 +0200

    run_test.pl: add POSTGIS_REGRESS_DB_OWNER env support
    
    Allows specifying a DB role to be given ownership of the regress
    database and be used to create extension of POSTGIS_REGRESS_EXT_CREATOR
    is not also provided to override that.
    
    References #5212
    References #5566
    References #5567

diff --git a/regress/run_test.pl b/regress/run_test.pl
index 1c987eaf6..1b7f47a44 100755
--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -49,7 +49,8 @@ BEGIN {
 
 our $DB = $ENV{"POSTGIS_REGRESS_DB"} || "postgis_reg";
 our $REGDIR = $ENV{"POSTGIS_REGRESS_DIR"} || abs_path(dirname($0));
-our $DB_ROLE_EXT_MKR = $ENV{"POSTGIS_REGRESS_ROLE_EXT_CREATOR"};
+our $DB_OWNER = $ENV{"POSTGIS_REGRESS_DB_OWNER"};
+our $DB_ROLE_EXT_MKR = $ENV{"POSTGIS_REGRESS_ROLE_EXT_CREATOR"} || $DB_OWNER;
 
 our $TOP_SOURCEDIR = ${REGDIR} . '/..';
 our $ABS_TOP_SOURCEDIR = abs_path(${TOP_SOURCEDIR});
@@ -761,12 +762,16 @@ Environment Variables:
   POSTGIS_REGRESS_DB
                   Name of database to create and use for regression tests.
                   Defaults to "postgis_reg"
+  POSTGIS_REGRESS_DB_OWNER
+                  PostgreSQL role to become owner of the regress db.
+                  Defaults to connecting user (determined by libpq env
+                  variables)
+  POSTGIS_REGRESS_ROLE_EXT_CREATOR
+                  PostgreSQL role to switch to for creating the
+                  postgis extensions. Defaults to POSTGIS_REGRESS_DB_OWNER
   POSTGIS_REGRESS_DIR
                   Base directory of regress tests. Defaults to
                   name of directory containing this script.
-  POSTGIS_REGRESS_ROLE_EXT_CREATOR
-                  PostgreSQL role to switch to for creating the
-                  postgis extensions.
 
 };
 
@@ -1503,7 +1508,10 @@ sub create_db
 {
 	my $createcmd = "createdb --encoding=UTF-8 --template=template0 --lc-collate=C";
 	if ( $pgvernum ge 150000 ) {
-		$createcmd .= " --locale=C --locale-provider=libc"
+		$createcmd .= " --locale=C --locale-provider=libc";
+	}
+	if ( $DB_OWNER ) {
+		$createcmd .= " --owner $DB_OWNER";
 	}
 	$createcmd .= " $DB > $REGRESS_LOG";
 	return not system($createcmd);

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

Summary of changes:
 regress/run_test.pl | 18 +++++++++++++-----
 1 file changed, 13 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list