]> granicus.if.org Git - postgis/commitdiff
Force using systemwide scripts when run with --extension
authorSandro Santilli <strk@kbt.io>
Tue, 8 Oct 2019 09:43:14 +0000 (09:43 +0000)
committerSandro Santilli <strk@kbt.io>
Tue, 8 Oct 2019 09:43:14 +0000 (09:43 +0000)
.. rather than relying on version mismatch (current vs. requested)
to tell where to pick scripts from ..

*might* relate to #4515

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

regress/run_test.pl

index 3ce3a2d165d3defcd76ccdbaf8c83c7aab760bab..1693eec0033de87ca38e944689d79030c2a48a2a 100755 (executable)
@@ -254,9 +254,9 @@ if ( ! $libver )
 
 sub scriptdir
 {
-       my $version = shift;
+       my ( $version, $systemwide ) = @_;
        my $scriptdir;
-       if ( $version and $version ne $libver ) {
+       if ( $systemwide or ( $version and $version ne $libver ) ) {
                my $pgis_majmin = $version;
                $pgis_majmin =~ s/^([1-9]*\.[0-9]*).*/\1/;
                $scriptdir = `pg_config --sharedir`;
@@ -756,7 +756,7 @@ sub run_simple_test
        mkpath($betmpdir);
        chmod 0777, $betmpdir;
 
-       my $scriptdir = scriptdir($libver);
+       my $scriptdir = scriptdir($libver, $OPT_EXTENSIONS);
        my $cmd = "psql -v \"VERBOSITY=terse\""
           . " -v \"tmpfile='$tmpfile'\""
           . " -v \"scriptdir=$scriptdir\""