[SCM] PostGIS branch stable-3.4 updated. 3.4.0-55-g07e3951dc

git at osgeo.org git at osgeo.org
Thu Oct 26 05:58:53 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, stable-3.4 has been updated
       via  07e3951dcf345f54f7e4eff182f66ceb3d8317ec (commit)
      from  6f0854100a8c290cb26e3bb839c6f0c30742d100 (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 07e3951dcf345f54f7e4eff182f66ceb3d8317ec
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Oct 26 14:57:58 2023 +0200

    Backport run_test.pl from master branch

diff --git a/regress/run_test.pl b/regress/run_test.pl
index afbca0e46..11d0dabf6 100755
--- a/regress/run_test.pl
+++ b/regress/run_test.pl
@@ -51,7 +51,7 @@ our $DB = $ENV{"POSTGIS_REGRESS_DB"} || "postgis_reg";
 our $REGDIR = $ENV{"POSTGIS_REGRESS_DIR"} || abs_path(dirname($0));
 our $TOP_SOURCEDIR = ${REGDIR} . '/..';
 our $ABS_TOP_SOURCEDIR = abs_path(${TOP_SOURCEDIR});
-our $TOP_BUILDDIR = $ENV{"POSTGIS_TOP_BUILD_DIR"} || ${TOP_SOURCEDIR};
+our $TOP_BUILDDIR = $ENV{"POSTGIS_TOP_BUILD_DIR"};
 our $sysdiff = !system("diff --strip-trailing-cr $0 $0 2> /dev/null");
 
 ##################################################################
@@ -130,12 +130,12 @@ sub findOrDie
 {
     my $exec = shift;
     my $verbose = shift;
-    printf "Checking for %s ... ", $exec if $verbose;
+    printf "Checking for %s ... ", $exec if $verbose gt 1;
     foreach my $d ( split /:/, $ENV{PATH} )
     {
         my $path = $d . '/' . $exec;
         if ( -x $path ) {
-            if ( $verbose ) {
+            if ( $verbose gt 1 ) {
                 print "found";
                 print " ($path)" if $verbose gt 1;
                 print "\n";
@@ -148,6 +148,20 @@ sub findOrDie
     die "HINT: use POSTGIS_TOP_BUILD_DIR env or --build-dir switch the specify top build dir.\n";
 }
 
+
+# If build dir is not given, try to guess
+if ( "${TOP_BUILDDIR}" eq "" )
+{
+    foreach my $d ( $ENV{'PWD'}, "${TOP_SOURCEDIR}" )
+    {
+        if ( -e ${d} . '/postgis_revision.h' )
+        {
+            $TOP_BUILDDIR="${d}";
+            last;
+        }
+    }
+}
+
 # Prepend scripts' build dirs to path
 # TODO: make this conditional ?
 $ENV{PATH} = $TOP_BUILDDIR . '/loader:' .
@@ -1525,12 +1539,6 @@ sub load_sql_file
 	my $file = shift;
 	my $strict = shift;
 
-	if ( $strict && ! -e $file )
-	{
-		fail "Unable to find $file";
-		return 0;
-	}
-
 	if ( -e $file )
 	{
 		# ON_ERROR_STOP is used by psql to return non-0 on an error
@@ -1548,6 +1556,12 @@ sub load_sql_file
 			return 0;
 		}
 	}
+	elsif ( $strict )
+	{
+		fail "Unable to find $file";
+		return 0;
+	}
+
 	return 1;
 }
 

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

Summary of changes:
 regress/run_test.pl | 32 +++++++++++++++++++++++---------
 1 file changed, 23 insertions(+), 9 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list