[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha2-114-g72e4e9d

git at osgeo.org git at osgeo.org
Thu Oct 29 07:02:00 PDT 2020


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  72e4e9de69b44c56f8bff8515dcdb9f3511f009a (commit)
      from  ebc942dccdfb9cb2adb5ff57a056fddebb8add49 (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 72e4e9de69b44c56f8bff8515dcdb9f3511f009a
Author: Sandro Santilli <strk at kbt.io>
Date:   Thu Oct 29 13:19:29 2020 +0100

    Allow running raster tests from arbitrary dirs, improve error handling

diff --git a/raster/test/regress/load_outdb-pre.pl b/raster/test/regress/load_outdb-pre.pl
index 1592030..0034c1f 100755
--- a/raster/test/regress/load_outdb-pre.pl
+++ b/raster/test/regress/load_outdb-pre.pl
@@ -57,11 +57,13 @@ SELECT
 	) AS rast
 END
 
-open(PRESQL, '>', $RASTERDIR . '/' . $TEST . '-pre.sql');
+my $PREFNAME = abs_path($TEST) . '-pre.sql';
+open(PRESQL, '>', $PREFNAME) || die ('Cannot open ' . $PREFNAME . ": $!");
 print PRESQL $sql;
 close(PRESQL);
 
 # no longer needed as the "clean" test takes care of it
-#open(POSTSQL, '>', $RASTERDIR . '/' . $TEST . '-post.sql');
+#my $POSTFNAME = abs_path($TEST) . '-post.sql';
+#open(POSTSQL, '>', $POSTFNAME) || die ('Cannot open ' . $POSTFNAME .  ": $!");;
 #print POSTSQL "DROP TABLE IF EXISTS raster_outdb_template;\n";
 #close(POSTSQL);
diff --git a/raster/test/regress/loader/Basic-post.pl b/raster/test/regress/loader/Basic-post.pl
index 0be9160..6da8945 100755
--- a/raster/test/regress/loader/Basic-post.pl
+++ b/raster/test/regress/loader/Basic-post.pl
@@ -1 +1 @@
-unlink "loader/Basic.tif";
+unlink $TEST . ".tif";
diff --git a/raster/test/regress/loader/Basic-pre.pl b/raster/test/regress/loader/Basic-pre.pl
index 2ee9cd2..98185b9 100755
--- a/raster/test/regress/loader/Basic-pre.pl
+++ b/raster/test/regress/loader/Basic-pre.pl
@@ -1 +1,9 @@
-link "loader/testraster.tif", "loader/Basic.tif";
+my $TARGETFILE = $TEST . '.tif';
+
+if ( ! -e $TARGETFILE ) {
+	my $FILERASTER = dirname($TEST) . "/testraster.tif";
+	link ("$FILERASTER", "$TARGETFILE") ||
+		die("Cannot link $FILERASTER to $TARGETFILE: $!");
+}
+
+1;
diff --git a/raster/test/regress/loader/BasicCopy-post.pl b/raster/test/regress/loader/BasicCopy-post.pl
index 90a74cf..6da8945 100755
--- a/raster/test/regress/loader/BasicCopy-post.pl
+++ b/raster/test/regress/loader/BasicCopy-post.pl
@@ -1 +1 @@
-unlink "loader/BasicCopy.tif";
+unlink $TEST . ".tif";
diff --git a/raster/test/regress/loader/BasicCopy-pre.pl b/raster/test/regress/loader/BasicCopy-pre.pl
index ba01f42..98185b9 100755
--- a/raster/test/regress/loader/BasicCopy-pre.pl
+++ b/raster/test/regress/loader/BasicCopy-pre.pl
@@ -1 +1,9 @@
-link "loader/testraster.tif", "loader/BasicCopy.tif";
+my $TARGETFILE = $TEST . '.tif';
+
+if ( ! -e $TARGETFILE ) {
+	my $FILERASTER = dirname($TEST) . "/testraster.tif";
+	link ("$FILERASTER", "$TARGETFILE") ||
+		die("Cannot link $FILERASTER to $TARGETFILE: $!");
+}
+
+1;
diff --git a/raster/test/regress/loader/BasicFilename-post.pl b/raster/test/regress/loader/BasicFilename-post.pl
index 015e9c3..6da8945 100755
--- a/raster/test/regress/loader/BasicFilename-post.pl
+++ b/raster/test/regress/loader/BasicFilename-post.pl
@@ -1 +1 @@
-unlink "loader/BasicFilename.tif";
+unlink $TEST . ".tif";
diff --git a/raster/test/regress/loader/BasicFilename-pre.pl b/raster/test/regress/loader/BasicFilename-pre.pl
index d5519a4..98185b9 100755
--- a/raster/test/regress/loader/BasicFilename-pre.pl
+++ b/raster/test/regress/loader/BasicFilename-pre.pl
@@ -1 +1,9 @@
-link "loader/testraster.tif", "loader/BasicFilename.tif";
+my $TARGETFILE = $TEST . '.tif';
+
+if ( ! -e $TARGETFILE ) {
+	my $FILERASTER = dirname($TEST) . "/testraster.tif";
+	link ("$FILERASTER", "$TARGETFILE") ||
+		die("Cannot link $FILERASTER to $TARGETFILE: $!");
+}
+
+1;
diff --git a/raster/test/regress/loader/BasicOutDB-post.pl b/raster/test/regress/loader/BasicOutDB-post.pl
index a1fd807..695bf14 100755
--- a/raster/test/regress/loader/BasicOutDB-post.pl
+++ b/raster/test/regress/loader/BasicOutDB-post.pl
@@ -1,2 +1,2 @@
-unlink "loader/BasicOutDB.tif";
-unlink "loader/BasicOutDB.opts";
+unlink $TEST . ".tif";
+unlink $TEST . ".opts";
diff --git a/raster/test/regress/loader/BasicOutDB-pre.pl b/raster/test/regress/loader/BasicOutDB-pre.pl
index 03dd841..3cf188e 100755
--- a/raster/test/regress/loader/BasicOutDB-pre.pl
+++ b/raster/test/regress/loader/BasicOutDB-pre.pl
@@ -1,12 +1,16 @@
 use File::Basename;
 use Cwd 'abs_path';
 
-my $REGDIR = abs_path(dirname($0));
-my $RASTERDIR = abs_path($REGDIR . "/../raster/test/regress");
-my $FILERASTER = $RASTERDIR . "/loader/testraster.tif";
+my $TARGETFILE = $TEST . '.tif';
 
-link "loader/testraster.tif", "loader/BasicOutDB.tif";
+my $FILERASTER = abs_path(dirname($TEST)) . "/testraster.tif";
 
-open(OPTS, '>', 'loader/BasicOutDB.opts');
+if ( ! -e $TARGETFILE ) {
+	link ("$FILERASTER", "$TARGETFILE") ||
+		die("Cannot link $FILERASTER to $TARGETFILE: $!");
+}
+
+my $OPTSFNAME = abs_path($TEST) . '.opts';
+open(OPTS, '>', $OPTSFNAME) || die ('Cannot open ' . $OPTSFNAME. ": $1");
 print OPTS "-F -C -R \"$FILERASTER\"\n";
 close(OPTS);
diff --git a/raster/test/regress/loader/Tiled10x10-post.pl b/raster/test/regress/loader/Tiled10x10-post.pl
index 207f430..6da8945 100755
--- a/raster/test/regress/loader/Tiled10x10-post.pl
+++ b/raster/test/regress/loader/Tiled10x10-post.pl
@@ -1 +1 @@
-unlink "loader/Tiled10x10.tif";
+unlink $TEST . ".tif";
diff --git a/raster/test/regress/loader/Tiled10x10-pre.pl b/raster/test/regress/loader/Tiled10x10-pre.pl
index 022dee8..98185b9 100755
--- a/raster/test/regress/loader/Tiled10x10-pre.pl
+++ b/raster/test/regress/loader/Tiled10x10-pre.pl
@@ -1 +1,9 @@
-link "loader/testraster.tif", "loader/Tiled10x10.tif";
+my $TARGETFILE = $TEST . '.tif';
+
+if ( ! -e $TARGETFILE ) {
+	my $FILERASTER = dirname($TEST) . "/testraster.tif";
+	link ("$FILERASTER", "$TARGETFILE") ||
+		die("Cannot link $FILERASTER to $TARGETFILE: $!");
+}
+
+1;
diff --git a/raster/test/regress/loader/Tiled10x10Copy-post.pl b/raster/test/regress/loader/Tiled10x10Copy-post.pl
index 20dd6c3..6da8945 100755
--- a/raster/test/regress/loader/Tiled10x10Copy-post.pl
+++ b/raster/test/regress/loader/Tiled10x10Copy-post.pl
@@ -1 +1 @@
-unlink "loader/Tiled10x10Copy.tif";
+unlink $TEST . ".tif";
diff --git a/raster/test/regress/loader/Tiled10x10Copy-pre.pl b/raster/test/regress/loader/Tiled10x10Copy-pre.pl
index 32f5834..98185b9 100755
--- a/raster/test/regress/loader/Tiled10x10Copy-pre.pl
+++ b/raster/test/regress/loader/Tiled10x10Copy-pre.pl
@@ -1 +1,9 @@
-link "loader/testraster.tif", "loader/Tiled10x10Copy.tif";
+my $TARGETFILE = $TEST . '.tif';
+
+if ( ! -e $TARGETFILE ) {
+	my $FILERASTER = dirname($TEST) . "/testraster.tif";
+	link ("$FILERASTER", "$TARGETFILE") ||
+		die("Cannot link $FILERASTER to $TARGETFILE: $!");
+}
+
+1;
diff --git a/raster/test/regress/loader/Tiled8x8-post.pl b/raster/test/regress/loader/Tiled8x8-post.pl
index 652b8f6..6da8945 100755
--- a/raster/test/regress/loader/Tiled8x8-post.pl
+++ b/raster/test/regress/loader/Tiled8x8-post.pl
@@ -1 +1 @@
-unlink "loader/Tiled8x8.tif";
+unlink $TEST . ".tif";
diff --git a/raster/test/regress/loader/Tiled8x8-pre.pl b/raster/test/regress/loader/Tiled8x8-pre.pl
index 4a46970..98185b9 100755
--- a/raster/test/regress/loader/Tiled8x8-pre.pl
+++ b/raster/test/regress/loader/Tiled8x8-pre.pl
@@ -1 +1,9 @@
-link "loader/testraster.tif", "loader/Tiled8x8.tif";
+my $TARGETFILE = $TEST . '.tif';
+
+if ( ! -e $TARGETFILE ) {
+	my $FILERASTER = dirname($TEST) . "/testraster.tif";
+	link ("$FILERASTER", "$TARGETFILE") ||
+		die("Cannot link $FILERASTER to $TARGETFILE: $!");
+}
+
+1;
diff --git a/raster/test/regress/loader/TiledAuto-post.pl b/raster/test/regress/loader/TiledAuto-post.pl
index 97227db..6da8945 100755
--- a/raster/test/regress/loader/TiledAuto-post.pl
+++ b/raster/test/regress/loader/TiledAuto-post.pl
@@ -1 +1 @@
-unlink "loader/TiledAuto.tif";
+unlink $TEST . ".tif";
diff --git a/raster/test/regress/loader/TiledAuto-pre.pl b/raster/test/regress/loader/TiledAuto-pre.pl
index 6d05f9c..c01569b 100755
--- a/raster/test/regress/loader/TiledAuto-pre.pl
+++ b/raster/test/regress/loader/TiledAuto-pre.pl
@@ -1 +1,9 @@
-link "loader/testraster2.tif", "loader/TiledAuto.tif";
+my $TARGETFILE = $TEST . '.tif';
+
+if ( ! -e $TARGETFILE ) {
+	my $FILERASTER = dirname($TEST) . "/testraster2.tif";
+	link ("$FILERASTER", "$TARGETFILE") ||
+		die("Cannot link $FILERASTER to $TARGETFILE: $!");
+}
+
+1;
diff --git a/raster/test/regress/loader/TiledAutoSkipNoData-post.pl b/raster/test/regress/loader/TiledAutoSkipNoData-post.pl
index 97227db..6da8945 100755
--- a/raster/test/regress/loader/TiledAutoSkipNoData-post.pl
+++ b/raster/test/regress/loader/TiledAutoSkipNoData-post.pl
@@ -1 +1 @@
-unlink "loader/TiledAuto.tif";
+unlink $TEST . ".tif";
diff --git a/raster/test/regress/loader/TiledAutoSkipNoData-pre.pl b/raster/test/regress/loader/TiledAutoSkipNoData-pre.pl
index 7f040fe..c01569b 100755
--- a/raster/test/regress/loader/TiledAutoSkipNoData-pre.pl
+++ b/raster/test/regress/loader/TiledAutoSkipNoData-pre.pl
@@ -1,2 +1,9 @@
-link "loader/testraster2.tif", "loader/TiledAutoSkipNoData.tif"
-unless -f "loader/TiledAutoSkipNoData.tif";
+my $TARGETFILE = $TEST . '.tif';
+
+if ( ! -e $TARGETFILE ) {
+	my $FILERASTER = dirname($TEST) . "/testraster2.tif";
+	link ("$FILERASTER", "$TARGETFILE") ||
+		die("Cannot link $FILERASTER to $TARGETFILE: $!");
+}
+
+1;

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

Summary of changes:
 raster/test/regress/load_outdb-pre.pl                  |  6 ++++--
 raster/test/regress/loader/Basic-post.pl               |  2 +-
 raster/test/regress/loader/Basic-pre.pl                | 10 +++++++++-
 raster/test/regress/loader/BasicCopy-post.pl           |  2 +-
 raster/test/regress/loader/BasicCopy-pre.pl            | 10 +++++++++-
 raster/test/regress/loader/BasicFilename-post.pl       |  2 +-
 raster/test/regress/loader/BasicFilename-pre.pl        | 10 +++++++++-
 raster/test/regress/loader/BasicOutDB-post.pl          |  4 ++--
 raster/test/regress/loader/BasicOutDB-pre.pl           | 14 +++++++++-----
 raster/test/regress/loader/Tiled10x10-post.pl          |  2 +-
 raster/test/regress/loader/Tiled10x10-pre.pl           | 10 +++++++++-
 raster/test/regress/loader/Tiled10x10Copy-post.pl      |  2 +-
 raster/test/regress/loader/Tiled10x10Copy-pre.pl       | 10 +++++++++-
 raster/test/regress/loader/Tiled8x8-post.pl            |  2 +-
 raster/test/regress/loader/Tiled8x8-pre.pl             | 10 +++++++++-
 raster/test/regress/loader/TiledAuto-post.pl           |  2 +-
 raster/test/regress/loader/TiledAuto-pre.pl            | 10 +++++++++-
 raster/test/regress/loader/TiledAutoSkipNoData-post.pl |  2 +-
 raster/test/regress/loader/TiledAutoSkipNoData-pre.pl  | 11 +++++++++--
 19 files changed, 95 insertions(+), 26 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list