@@ -147,7 +147,7 @@ public class JUnitTask extends Task {
private File tmpDir;
private File tmpDir;
private AntClassLoader classLoader = null;
private AntClassLoader classLoader = null;
private Permissions perm = null;
private Permissions perm = null;
private ForkStyle forkStyle = new ForkStyl e("perTest");
private ForkMode forkMode = new ForkMod e("perTest");
private static final int STRING_BUFFER_SIZE = 128;
private static final int STRING_BUFFER_SIZE = 128;
@@ -295,8 +295,8 @@ public class JUnitTask extends Task {
*
*
* @since Ant 1.6.2
* @since Ant 1.6.2
*/
*/
public void setForkStyle(ForkStyle styl e) {
this.forkStyle = styl e;
public void setForkMode(ForkMode mod e) {
this.forkMode = mod e;
}
}
/**
/**
@@ -641,11 +641,11 @@ public class JUnitTask extends Task {
public void execute() throws BuildException {
public void execute() throws BuildException {
List testLists = new ArrayList();
List testLists = new ArrayList();
boolean forkPerTest = forkStyle.getValue().equals(ForkStyl e.PER_TEST);
if (forkPerTest || forkStyle.getValue().equals(ForkStyl e.ONCE)) {
boolean forkPerTest = forkMode.getValue().equals(ForkMod e.PER_TEST);
if (forkPerTest || forkMode.getValue().equals(ForkMod e.ONCE)) {
testLists.addAll(executeOrQueue(getIndividualTests(),
testLists.addAll(executeOrQueue(getIndividualTests(),
forkPerTest));
forkPerTest));
} else { /* forkStyle.getValue().equals(ForkStyl e.PER_BATCH) */
} else { /* forkMode.getValue().equals(ForkMod e.PER_BATCH) */
final int count = batchTests.size();
final int count = batchTests.size();
for (int i = 0; i < count; i++) {
for (int i = 0; i < count; i++) {
BatchTest batchtest = (BatchTest) batchTests.elementAt(i);
BatchTest batchtest = (BatchTest) batchTests.elementAt(i);
@@ -1379,7 +1379,7 @@ public class JUnitTask extends Task {
* These are the different forking options
* These are the different forking options
* @since 1.6.2
* @since 1.6.2
*/
*/
public static final class ForkStyl e extends EnumeratedAttribute {
public static final class ForkMod e extends EnumeratedAttribute {
/**
/**
* fork once only
* fork once only
@@ -1394,11 +1394,11 @@ public class JUnitTask extends Task {
*/
*/
public static final String PER_BATCH = "perBatch";
public static final String PER_BATCH = "perBatch";
public ForkStyl e() {
public ForkMod e() {
super();
super();
}
}
public ForkStyl e(String value) {
public ForkMod e(String value) {
super();
super();
setValue(value);
setValue(value);
}
}