This is the mail archive of the
mauve-patches@sourceware.org
mailing list for the Mauve project.
write XML output file only once
- From: Christian Thalinger <twisti at complang dot tuwien dot ac dot at>
- To: mauve-patches ml <mauve-patches at sourceware dot org>
- Date: Thu, 15 May 2008 12:36:20 +0200
- Subject: write XML output file only once
Hi!
This patch only writes the XML output file once after the Harness sends
"_dump_data_" and not after each finished testlet. This can be a huge
amount of data writes when running e.g. on java.util.
OK to commit?
- twisti
---
Index: RunnerProcess.java
===================================================================
RCS file: /cvs/mauve/mauve/RunnerProcess.java,v
retrieving revision 1.16
diff -u -3 -p -r1.16 RunnerProcess.java
--- RunnerProcess.java 26 Nov 2006 23:12:41 -0000 1.16
+++ RunnerProcess.java 15 May 2008 10:33:20 -0000
@@ -214,6 +214,21 @@ public class RunnerProcess
System.exit(0);
if (testname.equals("_dump_data_"))
{
+ // Print the report if necessary.
+ if (report != null)
+ {
+ File f = new File(xmlfile);
+ try
+ {
+ report.writeXml(f);
+ }
+ catch (IOException e)
+ {
+ throw new Error("Failed to write data to xml file: "
+ + e.getMessage());
+ }
+ }
+
if (useEMMA)
dumpCoverageData();
else
@@ -433,20 +448,6 @@ public class RunnerProcess
// Print out a summary.
int temp = harness.done();
- // Print the report if necessary.
- if (report != null)
- {
- File f = new File(xmlfile);
- try
- {
- report.writeXml(f);
- }
- catch (IOException e)
- {
- throw new Error("Failed to write data to xml file: "
- + e.getMessage());
- }
- }
// Report back to Harness that we've finished properly, whether the test
// passed or failed. Harness will wait for a message starting with