[Tools] winetest/gather: In case of error keep the old summary and totals files.

Francois Gouget fgouget at codeweavers.com
Thu Mar 23 06:58:08 CDT 2017


Signed-off-by: Francois Gouget <fgouget at codeweavers.com>
---

Why would we want to keep te .new file and remove the existing file? Did 
I miss something? It's likely a bit outdated but losing it means the 
results will disappear from the main index which seems worse. Also this 
is inconsistent with how we handle all the other files.

 winetest/gather | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/winetest/gather b/winetest/gather
index a24f06e..9680fbb 100755
--- a/winetest/gather
+++ b/winetest/gather
@@ -622,7 +622,7 @@ sub build_totals($)
         printf TOTAL "%s %u %u %u %u %u\n", $report->{group}->{name}, $report_count, $unit_count, $report->{errors}, $report->{todos}, $report->{successes};
     }
     close TOTAL;
-    rename "$datadir/$build/total.txt.new", "$datadir/$build/total.txt" or unlink "$datadir/$build/total.txt";
+    rename "$datadir/$build/total.txt.new", "$datadir/$build/total.txt" or unlink "$datadir/$build/total.txt.new";
 }
 
 sub output_table($)
@@ -749,7 +749,7 @@ foreach my $group (@groups) {
 output_table(undef);
 
 close SUMMARY;
-rename "$datadir/$build/summary.txt.new", "$datadir/$build/summary.txt" or unlink "$datadir/$build/summary.txt";
+rename "$datadir/$build/summary.txt.new", "$datadir/$build/summary.txt" or unlink "$datadir/$build/summary.txt.new";
 
 build_totals(\@groups);
 
-- 
2.11.0




More information about the wine-patches mailing list