Browse Source

<junit includeantruntime="true" fork="true"> replaced the CLASSPATH

instead of adding to it.

PR: 14971


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@275265 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 21 years ago
parent
commit
71be9bc2d6
2 changed files with 14 additions and 0 deletions
  1. +3
    -0
      WHATSNEW
  2. +11
    -0
      src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java

+ 3
- 0
WHATSNEW View File

@@ -242,6 +242,9 @@ Fixed bugs:
* The socket condition will now close the socket created to test.
Bugzilla Report 23040.

* <junit includeantruntime="true" fork="true"> replaced the CLASSPATH instead
of adding to it. Bugzilla Report 14971.

Other changes:
--------------
* All tasks can be used outside of <target>s. Note that some tasks


+ 11
- 0
src/main/org/apache/tools/ant/taskdefs/optional/junit/JUnitTask.java View File

@@ -717,6 +717,17 @@ public class JUnitTask extends Task {
cmd.createArgument().setValue("haltOnFailure="
+ test.getHaltonfailure());
if (includeAntRuntime) {
Vector v = Execute.getProcEnvironment();
Enumeration e = v.elements();
while (e.hasMoreElements()) {
String s = (String) e.nextElement();
if (s.startsWith("CLASSPATH=")) {
cmd.createClasspath(getProject()).createPath()
.append(new Path(getProject(),
s.substring(10 // "CLASSPATH=".length()
)));
}
}
log("Implicitly adding " + antRuntimeClasses + " to CLASSPATH",
Project.MSG_VERBOSE);
cmd.createClasspath(getProject()).createPath()


Loading…
Cancel
Save