]> granicus.if.org Git - postgis/commitdiff
Use a different diff file for each tested shapefile output file
authorSandro Santilli <strk@keybit.net>
Tue, 15 Oct 2013 15:02:20 +0000 (15:02 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 15 Oct 2013 15:02:20 +0000 (15:02 +0000)
Hopefully fixes #2507 (permission denied on overriding a tmp file)

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

regress/run_test.pl

index 13afe444a62cbcaccd47bc90c52d258aafda0e39..37dc04dca8d616c5cd9c44282ca02773693c9be9 100755 (executable)
@@ -923,9 +923,9 @@ sub run_dumper_test
   # ON_ERROR_STOP is used by psql to return non-0 on an error
   my $psql_opts="--no-psqlrc --variable ON_ERROR_STOP=true";
 
-       my $shpfile = "${TMPDIR}/dumper-" . basename(${TEST}) . "-shp";
-       my $outfile = "${TMPDIR}/dumper-" . basename(${TEST}) . ".out";
-       my $errfile = "${TMPDIR}/dumper-" . basename(${TEST}) . ".err";
+  my $shpfile = "${TMPDIR}/dumper-" . basename(${TEST}) . "-shp";
+  my $outfile = "${TMPDIR}/dumper-" . basename(${TEST}) . ".out";
+  my $errfile = "${TMPDIR}/dumper-" . basename(${TEST}) . ".err";
 
   # Produce the output SHP file.
   open DUMPFILE, "$dump_file" or die "Cannot open dump file $dump_file\n";
@@ -949,8 +949,6 @@ sub run_dumper_test
     return 0;
   }
 
-  my $diffile = sprintf("%s/test_%s_diff", $TMPDIR, $RUN);
-
   my $numtests = 0;
   foreach my $ext ("shp","prj","dbf","shx") {
     my $obtained = ${shpfile}.".".$ext;
@@ -965,6 +963,7 @@ sub run_dumper_test
       my $diff = diff($expected,  $obtained);
       if ( $diff )
       {
+        my $diffile = sprintf("%s/dumper_test_%s_diff", $TMPDIR, $ext);
         open(FILE, ">$diffile");
         print FILE $diff;
         close(FILE);