From: Sandro Santilli Date: Tue, 9 Feb 2016 22:04:46 +0000 (+0000) Subject: Ensure restored database is created the same as the initial one X-Git-Tag: 2.3.0beta1~256 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1a00b3481a7c29689aac94842e3e08278386b999;p=postgis Ensure restored database is created the same as the initial one Fixes ORDER BY consistency, probably also with the loader tests already tweaked to workaround this See #3444 git-svn-id: http://svn.osgeo.org/postgis/trunk@14657 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/regress/run_test.pl b/regress/run_test.pl index 4d85a85f3..fd9e43180 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -1197,13 +1197,19 @@ sub count_db_objects ################################################################## # Create the spatial database ################################################################## +sub create_db +{ + my $cmd = "createdb --encoding=UTF-8 --template=template0 --lc-collate=C $DB > $REGRESS_LOG"; + return system($cmd); +} + sub create_spatial { my ($cmd, $rv); print "Creating database '$DB' \n"; - $cmd = "createdb --encoding=UTF-8 --template=template0 --lc-collate=C $DB > $REGRESS_LOG"; - $rv = system($cmd); + $rv = create_db(); + $cmd = "createlang plpgsql $DB >> $REGRESS_LOG 2>&1"; $rv = system($cmd); @@ -1529,7 +1535,7 @@ sub dump_restore die; } - $rv = system("createdb ${DB} >> $REGRESS_LOG 2>&1"); + $rv = create_db(); if ( $rv ) { fail("Could not create ${DB}", $REGRESS_LOG); die;