Return-Path: Delivered-To: apmail-ant-dev-archive@www.apache.org Received: (qmail 62528 invoked from network); 27 Apr 2004 07:45:51 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 27 Apr 2004 07:45:51 -0000 Received: (qmail 4887 invoked by uid 500); 27 Apr 2004 07:45:25 -0000 Delivered-To: apmail-ant-dev-archive@ant.apache.org Received: (qmail 4847 invoked by uid 500); 27 Apr 2004 07:45:24 -0000 Mailing-List: contact dev-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list dev@ant.apache.org Received: (qmail 4833 invoked by uid 500); 27 Apr 2004 07:45:24 -0000 Received: (qmail 4829 invoked from network); 27 Apr 2004 07:45:24 -0000 Received: from unknown (HELO minotaur.apache.org) (209.237.227.194) by daedalus.apache.org with SMTP; 27 Apr 2004 07:45:24 -0000 Received: (qmail 62474 invoked by uid 1146); 27 Apr 2004 07:45:48 -0000 Date: 27 Apr 2004 07:45:48 -0000 Message-ID: <20040427074548.62473.qmail@minotaur.apache.org> From: bodewig@apache.org To: ant-cvs@apache.org Subject: cvs commit: ant/src/main/org/apache/tools/ant/taskdefs/optional/junit JUnitTask.java X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N bodewig 2004/04/27 00:45:48 Modified: . Tag: ANT_16_BRANCH WHATSNEW build.xml docs/manual/OptionalTasks Tag: ANT_16_BRANCH junit.html src/main/org/apache/tools/ant/taskdefs/optional/junit Tag: ANT_16_BRANCH JUnitTask.java Log: merge Revision Changes Path No revision No revision 1.503.2.88 +5 -0 ant/WHATSNEW Index: WHATSNEW =================================================================== RCS file: /home/cvs/ant/WHATSNEW,v retrieving revision 1.503.2.87 retrieving revision 1.503.2.88 diff -u -r1.503.2.87 -r1.503.2.88 --- WHATSNEW 26 Apr 2004 19:20:24 -0000 1.503.2.87 +++ WHATSNEW 27 Apr 2004 07:45:47 -0000 1.503.2.88 @@ -114,6 +114,11 @@ * New "pattern" attribute for selector. +* has a new forkmode attribute that controls the number of + Java VMs that get created when forking tests. This allows you to + run all tests in a single forked JVM reducing the overhead of VM + creation a lot. Bugzilla Report 24697. + Changes from Ant 1.6.0 to Ant 1.6.1 =================================== 1.392.2.25 +2 -2 ant/build.xml Index: build.xml =================================================================== RCS file: /home/cvs/ant/build.xml,v retrieving revision 1.392.2.24 retrieving revision 1.392.2.25 diff -u -r1.392.2.24 -r1.392.2.25 --- build.xml 16 Apr 2004 07:05:32 -0000 1.392.2.24 +++ build.xml 27 Apr 2004 07:45:47 -0000 1.392.2.25 @@ -53,7 +53,7 @@ - + No revision No revision 1.30.2.5 +18 -0 ant/docs/manual/OptionalTasks/junit.html Index: junit.html =================================================================== RCS file: /home/cvs/ant/docs/manual/OptionalTasks/junit.html,v retrieving revision 1.30.2.4 retrieving revision 1.30.2.5 diff -u -r1.30.2.4 -r1.30.2.5 --- junit.html 20 Apr 2004 07:29:36 -0000 1.30.2.4 +++ junit.html 27 Apr 2004 07:45:47 -0000 1.30.2.5 @@ -69,6 +69,24 @@ No; default is off. + forkmode + Controls how many Java Virtual Machines get + created if you want to fork some tests. Possible values are + "perTest" (the default), "perBatch" and + "once". "once" creates only a single Java VM + for all tests while "perTest" creates a new VM for each + TestCase class. "perBatch" creates a VM for each nested + <batchtest> and one collecting all nested + <test>s. Note that only tests with the same + settings of filtertrace, haltonerror, + haltonfailure, errorproperty and + failureproperty can share a VM, so even if you set + forkmode to "once", Ant may have to create + more than a single Java VM. This attribute is ignored for tests + that don't get forked into a new Java VM. since Ant 1.6.2 + No; default is perTest. + + haltonerror Stop the build process if an error occurs during the test run. No revision No revision 1.83.2.12 +10 -10 ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java Index: JUnitTask.java =================================================================== RCS file: /home/cvs/ant/src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java,v retrieving revision 1.83.2.11 retrieving revision 1.83.2.12 diff -u -r1.83.2.11 -r1.83.2.12 --- JUnitTask.java 20 Apr 2004 06:53:29 -0000 1.83.2.11 +++ JUnitTask.java 27 Apr 2004 07:45:47 -0000 1.83.2.12 @@ -147,7 +147,7 @@ private File tmpDir; private AntClassLoader classLoader = null; private Permissions perm = null; - private ForkStyle forkStyle = new ForkStyle("perTest"); + private ForkMode forkMode = new ForkMode("perTest"); private static final int STRING_BUFFER_SIZE = 128; @@ -295,8 +295,8 @@ * * @since Ant 1.6.2 */ - public void setForkStyle(ForkStyle style) { - this.forkStyle = style; + public void setForkMode(ForkMode mode) { + this.forkMode = mode; } /** @@ -628,11 +628,11 @@ public void execute() throws BuildException { List testLists = new ArrayList(); - boolean forkPerTest = forkStyle.getValue().equals(ForkStyle.PER_TEST); - if (forkPerTest || forkStyle.getValue().equals(ForkStyle.ONCE)) { + boolean forkPerTest = forkMode.getValue().equals(ForkMode.PER_TEST); + if (forkPerTest || forkMode.getValue().equals(ForkMode.ONCE)) { testLists.addAll(executeOrQueue(getIndividualTests(), forkPerTest)); - } else { /* forkStyle.getValue().equals(ForkStyle.PER_BATCH) */ + } else { /* forkMode.getValue().equals(ForkMode.PER_BATCH) */ final int count = batchTests.size(); for (int i = 0; i < count; i++) { BatchTest batchtest = (BatchTest) batchTests.elementAt(i); @@ -1366,7 +1366,7 @@ * These are the different forking options * @since 1.6.2 */ - public static final class ForkStyle extends EnumeratedAttribute { + public static final class ForkMode extends EnumeratedAttribute { /** * fork once only @@ -1381,11 +1381,11 @@ */ public static final String PER_BATCH = "perBatch"; - public ForkStyle() { + public ForkMode() { super(); } - public ForkStyle(String value) { + public ForkMode(String value) { super(); setValue(value); } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org For additional commands, e-mail: dev-help@ant.apache.org