Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 12539 invoked from network); 19 Jan 2006 20:05:47 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 19 Jan 2006 20:05:47 -0000 Received: (qmail 61381 invoked by uid 500); 19 Jan 2006 20:05:45 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 61326 invoked by uid 500); 19 Jan 2006 20:05:45 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 61315 invoked by uid 500); 19 Jan 2006 20:05:44 -0000 Received: (qmail 61311 invoked by uid 99); 19 Jan 2006 20:05:44 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 19 Jan 2006 12:05:44 -0800 X-ASF-Spam-Status: No, hits=-9.4 required=10.0 tests=ALL_TRUSTED,NO_REAL_NAME X-Spam-Check-By: apache.org Received: from [209.237.227.194] (HELO minotaur.apache.org) (209.237.227.194) by apache.org (qpsmtpd/0.29) with SMTP; Thu, 19 Jan 2006 12:05:44 -0800 Received: (qmail 12172 invoked by uid 65534); 19 Jan 2006 20:05:23 -0000 Message-ID: <20060119200523.12171.qmail@minotaur.apache.org> Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r370591 - in /ant/core/trunk: WHATSNEW src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java Date: Thu, 19 Jan 2006 20:05:21 -0000 To: ant-cvs@apache.org From: antoine@apache.org X-Mailer: svnmailer-1.0.5 X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Author: antoine Date: Thu Jan 19 12:05:14 2006 New Revision: 370591 URL: http://svn.apache.org/viewcvs?rev=370591&view=rev Log: Bugzilla 37426 Submitted by Maarten Coene task doesn't print all the Test names when using forkmode='once' Modified: ant/core/trunk/WHATSNEW ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java Modified: ant/core/trunk/WHATSNEW URL: http://svn.apache.org/viewcvs/ant/core/trunk/WHATSNEW?rev=370591&r1=370590&r2=370591&view=diff ============================================================================== --- ant/core/trunk/WHATSNEW (original) +++ ant/core/trunk/WHATSNEW Thu Jan 19 12:05:14 2006 @@ -178,6 +178,9 @@ * Copy task would fail on locked (or otherwise uncopyable) files even if failonerror set to false. Bugzilla report 38175. +* task did not print all the Test names when using forkmode='once'. + Bugzilla report 37426. + Other changes: -------------- * Minor performance improvements Bugzilla report 37777 Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java?rev=370591&r1=370590&r2=370591&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java Thu Jan 19 12:05:14 2006 @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 The Apache Software Foundation + * Copyright 2000-2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -766,8 +766,8 @@ * @param watchdog the watchdog in charge of cancelling the test if it * exceeds a certain amount of time. Can be null, in this case * the test could probably hang forever. - * @param ForkedVMState will hold information about the forked - * VM's sanity. + * @param casesFile list of test cases to execute. Can be null, + * in this case only one test is executed. * @throws BuildException in case of error creating a temporary property file, * or if the junit process can not be forked */ @@ -789,9 +789,6 @@ } cmd.setClassname("org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner"); if (casesFile == null) { - if (summary) { - log("Running " + test.getName(), Project.MSG_INFO); - } cmd.createArgument().setValue(test.getName()); } else { log("Running multiple tests in the same VM", Project.MSG_VERBOSE); @@ -927,7 +924,7 @@ * The file will be in the project basedir unless tmpDir declares * something else. * @param prefix - * @return + * @return created file */ private File createTempPropertiesFile(String prefix) { File propsFile = @@ -1073,7 +1070,6 @@ test.getHaltonfailure(), false, true, classLoader); if (summary) { - log("Running " + test.getName(), Project.MSG_INFO); SummaryJUnitResultFormatter f = new SummaryJUnitResultFormatter(); @@ -1438,7 +1434,7 @@ /** * hashcode is based only on the boolean members, and returns a value * in the range 0-7. - * @return + * @return hash code value */ public int hashCode() { return (filterTrace ? 1 : 0) Modified: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java URL: http://svn.apache.org/viewcvs/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java?rev=370591&r1=370590&r2=370591&view=diff ============================================================================== --- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java (original) +++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/optional/junit/SummaryJUnitResultFormatter.java Thu Jan 19 12:05:14 2006 @@ -1,5 +1,5 @@ /* - * Copyright 2000-2002,2004 The Apache Software Foundation + * Copyright 2000-2002,2004,2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -50,9 +50,20 @@ public SummaryJUnitResultFormatter() { } /** - * Empty + * The testsuite started. */ public void startTestSuite(JUnitTest suite) { + String newLine = System.getProperty("line.separator"); + StringBuffer sb = new StringBuffer("Running "); + sb.append(suite.getName()); + sb.append(newLine); + + try { + out.write(sb.toString().getBytes()); + out.flush(); + } catch (IOException ioex) { + throw new BuildException("Unable to write summary output", ioex); + } } /** * Empty --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org