]> granicus.if.org Git - postgis/commitdiff
Upgrade SFCGAL too when requested
authorSandro Santilli <strk@kbt.io>
Tue, 9 Jan 2018 18:06:42 +0000 (18:06 +0000)
committerSandro Santilli <strk@kbt.io>
Tue, 9 Jan 2018 18:06:42 +0000 (18:06 +0000)
Might help with https://debbie.postgis.net/job/PostGIS_Regress/8247/console

git-svn-id: http://svn.osgeo.org/postgis/trunk@16237 b70326c6-7e19-0410-871a-916f4a2858ee

regress/run_test.pl

index 9ce1c8cbbcba4f2b679fb86d10bbc90b562c15d6..3a39877277f5d2b7942921cfb3d2d3d43ce02830 100755 (executable)
@@ -1401,6 +1401,22 @@ sub upgrade_spatial
             die "$script not found\n";
         }
     }
+
+    if ( $OPT_WITH_SFCGAL )
+    {
+        my $script = `ls ${STAGED_SCRIPTS_DIR}/sfcgal_upgrade.sql`;
+        chomp($script);
+        if ( -e $script )
+        {
+            print "Upgrading sfcgal\n";
+            load_sql_file($script);
+        }
+        else
+        {
+            die "$script not found\n";
+        }
+    }
+
     return 1;
 }
 
@@ -1437,6 +1453,17 @@ sub upgrade_spatial_extensions
       }
     }
 
+    if ( $OPT_WITH_SFCGAL )
+    {
+      my $sql = "ALTER EXTENSION postgis_sfcgal UPDATE TO '${nextver}'";
+      $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1";
+      $rv = system($cmd);
+      if ( $rv ) {
+        fail "Error encountered creating EXTENSION POSTGIS_SFCGAL", $REGRESS_LOG;
+        die;
+      }
+    }
+
     return 1;
 }