From: Sandro Santilli Date: Tue, 9 Jan 2018 18:36:02 +0000 (+0000) Subject: Upgrade SFCGAL too when requested X-Git-Tag: 2.4.3rc1~15 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8cbc43713fffce2c5cd7eea7604d45dabd691f05;p=postgis Upgrade SFCGAL too when requested git-svn-id: http://svn.osgeo.org/postgis/branches/2.4@16239 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/run_test.pl b/regress/run_test.pl index 4ee45c562..7de5e8270 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -1398,6 +1398,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; } @@ -1434,6 +1450,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; }