postgis.git / summary / log / commit / refs

commit    1cdfe9fa401d65b839dbf2d131cd3bf92e12deef
Author:   Sandro Santilli <strk@kbt.io>
Date:     Sun Feb 19 23:50:51 2023 +0000

    run_test.pl: don't prepare target db restoring from ext based dump
    
    Closes #5343


regress/run_test.pl | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/regress/run_test.pl b/regress/run_test.pl index f6384ab59..6afc54bd4 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -394,13 +394,21 @@ if ( $OPT_DUMPRESTORE ) die; } - print "Creating spatial db '${DB}'\n"; - undef($OPT_UPGRADE_FROM); # to directly prepare the target - $rv = create_spatial(); + print "Creating db '${DB}'\n"; + $rv = create_db(); if ( ! $rv ) { - fail("Could not create spatial db ${DB}", $REGRESS_LOG); + fail("Could not create db ${DB}", $REGRESS_LOG); die; } + + # Extension based spatial db do not need the target + # database to be prepared in any way, script based + # spatial db requires being prepared. + if ( not $OPT_EXTENSIONS ) + { + die unless prepare_spatial(); + } + die unless restore_db($DBDUMP); unlink($DBDUMP); @@ -1427,7 +1435,7 @@ sub count_postgis_objects sub create_db { my $createcmd = "createdb --encoding=UTF-8 --template=template0 --lc-collate=C $DB > $REGRESS_LOG"; - return system($createcmd); + return not system($createcmd); } sub create_spatial [parent: c2dbb220d057]