From 4edfee4281c83ae850a6681bc63343f21416ca47 Mon Sep 17 00:00:00 2001 From: Sandro Santilli Date: Tue, 15 Oct 2013 15:02:20 +0000 Subject: [PATCH] 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 --- regress/run_test.pl | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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); -- 2.50.1