From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21289 invoked by alias); 15 May 2008 10:36:47 -0000 Received: (qmail 21277 invoked by uid 22791); 15 May 2008 10:36:44 -0000 X-Spam-Check-By: sourceware.org Received: from vegas.theobroma-systems.com (HELO mail.theobroma-systems.com) (88.198.52.168) by sourceware.org (qpsmtpd/0.31) with ESMTP; Thu, 15 May 2008 10:36:25 +0000 Received: from [86.59.122.178] (port=50552 helo=[10.0.2.106]) by mail.theobroma-systems.com with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Jwaou-0006xA-Vl for mauve-patches@sourceware.org; Thu, 15 May 2008 12:36:22 +0200 Subject: write XML output file only once From: Christian Thalinger To: mauve-patches ml Content-Type: text/plain Date: Thu, 15 May 2008 10:36:00 -0000 Message-Id: <1210847780.3214.24.camel@imac523d.theobroma-systems.com> Mime-Version: 1.0 X-Mailer: Evolution 2.22.1 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact mauve-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: mauve-patches-owner@sourceware.org X-SW-Source: 2008/txt/msg00030.txt.bz2 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