* write XML output file only once
@ 2008-05-15 10:36 Christian Thalinger
2008-05-19 8:09 ` Christian Thalinger
0 siblings, 1 reply; 2+ messages in thread
From: Christian Thalinger @ 2008-05-15 10:36 UTC (permalink / raw)
To: mauve-patches ml
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: write XML output file only once
2008-05-15 10:36 write XML output file only once Christian Thalinger
@ 2008-05-19 8:09 ` Christian Thalinger
0 siblings, 0 replies; 2+ messages in thread
From: Christian Thalinger @ 2008-05-19 8:09 UTC (permalink / raw)
To: mauve-patches ml
On Thu, 2008-05-15 at 12:36 +0200, Christian Thalinger wrote:
> 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?
I'll commit that one now. For me this is a much better solution than
the current one because the current one is only better if the failing
test is the last one (think of running a lot of tests like java.util,
not just only one or two). When a test crashes or hangs Harness
restarts a new RunnerProcess and overwrites the previous XML file, so
all previous test data is lost anyways.
- twisti
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-19 8:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-05-15 10:36 write XML output file only once Christian Thalinger
2008-05-19 8:09 ` Christian Thalinger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).