From: Sandro Santilli Date: Tue, 15 Oct 2013 15:02:20 +0000 (+0000) Subject: Use a different diff file for each tested shapefile output file X-Git-Tag: 2.2.0rc1~1327 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4edfee4281c83ae850a6681bc63343f21416ca47;p=postgis Use a different diff file for each tested shapefile output file 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 --- diff --git a/regress/run_test.pl b/regress/run_test.pl index 13afe444a..37dc04dca 100755 --- a/regress/run_test.pl +++ b/regress/run_test.pl @@ -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);