From: Sandro Santilli Date: Tue, 9 Jan 2018 18:06:42 +0000 (+0000) Subject: Upgrade SFCGAL too when requested X-Git-Tag: 2.5.0alpha~212 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=92d32c4c975b373cecf40a2cc88315c5354e5b26;p=postgis Upgrade SFCGAL too when requested 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 --- diff --git a/regress/run_test.pl b/regress/run_test.pl index 9ce1c8cbb..3a3987727 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -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; }