From: Sandro Santilli Date: Mon, 24 Sep 2018 10:18:15 +0000 (+0000) Subject: [run_test] Drop raster if needed when enforced by extension X-Git-Tag: 3.0.0alpha1~389 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9d34884ac55202bfad6e27eaa3f62060e6b9a323;p=postgis [run_test] Drop raster if needed when enforced by extension git-svn-id: http://svn.osgeo.org/postgis/trunk@16840 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/run_test.pl b/regress/run_test.pl index 1376d5cb3..d1af06753 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -1509,6 +1509,30 @@ sub upgrade_spatial_extensions } } } + else + { + # Raster support was not requested, so drop it if + # left unpackaged + if ( $OPT_UPGRADE_FROM + && ! has_split_raster_ext($OPT_UPGRADE_FROM) ) + { + $sql = "CREATE EXTENSION postgis_raster VERSION '${nextver}' FROM unpackaged"; + $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1"; + $rv = system($cmd); + if ( $rv ) { + fail "Error encountered creating EXTENSION POSTGIS_RASTER from unpackaged on upgrade", $REGRESS_LOG; + die; + } + + $sql = "DROP EXTENSION postgis_raster"; + $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1"; + $rv = system($cmd); + if ( $rv ) { + fail "Error encountered dropping EXTENSION POSTGIS_RASTER on upgrade", $REGRESS_LOG; + die; + } + } + } if ( $OPT_WITH_TOPO ) {