[postgis-tickets] r14658 - Ensure restored database is created the same as the initial one

Sandro Santilli strk at keybit.net
Tue Feb 9 14:05:38 PST 2016


Author: strk
Date: 2016-02-09 14:05:38 -0800 (Tue, 09 Feb 2016)
New Revision: 14658

Modified:
   branches/2.2/regress/run_test.pl
Log:
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

Modified: branches/2.2/regress/run_test.pl
===================================================================
--- branches/2.2/regress/run_test.pl	2016-02-09 22:04:46 UTC (rev 14657)
+++ branches/2.2/regress/run_test.pl	2016-02-09 22:05:38 UTC (rev 14658)
@@ -1197,13 +1197,19 @@
 ##################################################################
 # 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 @@
 		die;
   }
 
-  $rv = system("createdb ${DB} >> $REGRESS_LOG 2>&1");
+  $rv = create_db();
   if ( $rv ) {
     fail("Could not create ${DB}", $REGRESS_LOG);
 		die;



More information about the postgis-tickets mailing list