|
|
@@ -671,10 +671,7 @@ public class JUnitTask extends Task { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} finally { |
|
|
} finally { |
|
|
if (classLoader != null && reloading) { |
|
|
|
|
|
classLoader.cleanup(); |
|
|
|
|
|
} |
|
|
|
|
|
classLoader = null; |
|
|
|
|
|
|
|
|
deleteClassLoader(); |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@@ -1112,9 +1109,6 @@ public class JUnitTask extends Task { |
|
|
} |
|
|
} |
|
|
if (classLoader != null) { |
|
|
if (classLoader != null) { |
|
|
classLoader.resetThreadContextLoader(); |
|
|
classLoader.resetThreadContextLoader(); |
|
|
if (!reloading) { |
|
|
|
|
|
classLoader.cleanup(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
@@ -1273,7 +1267,7 @@ public class JUnitTask extends Task { |
|
|
*/ |
|
|
*/ |
|
|
private void logVmExit(FormatterElement[] feArray, JUnitTest test, |
|
|
private void logVmExit(FormatterElement[] feArray, JUnitTest test, |
|
|
String message) { |
|
|
String message) { |
|
|
createClassLoader(); |
|
|
|
|
|
|
|
|
createClassLoader(); |
|
|
test.setCounts(1, 0, 1); |
|
|
test.setCounts(1, 0, 1); |
|
|
test.setProperties(getProject().getProperties()); |
|
|
test.setProperties(getProject().getProperties()); |
|
|
for (int i = 0; i < feArray.length; i++) { |
|
|
for (int i = 0; i < feArray.length; i++) { |
|
|
@@ -1330,6 +1324,7 @@ public class JUnitTask extends Task { |
|
|
Path userClasspath = getCommandline().getClasspath(); |
|
|
Path userClasspath = getCommandline().getClasspath(); |
|
|
if (userClasspath != null) { |
|
|
if (userClasspath != null) { |
|
|
if (reloading || classLoader == null) { |
|
|
if (reloading || classLoader == null) { |
|
|
|
|
|
deleteClassLoader(); |
|
|
Path classpath = (Path) userClasspath.clone(); |
|
|
Path classpath = (Path) userClasspath.clone(); |
|
|
if (includeAntRuntime) { |
|
|
if (includeAntRuntime) { |
|
|
log("Implicitly adding " + antRuntimeClasses |
|
|
log("Implicitly adding " + antRuntimeClasses |
|
|
@@ -1352,6 +1347,19 @@ public class JUnitTask extends Task { |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
* Removes a classloader if needed. |
|
|
|
|
|
* @since Ant 1.7 |
|
|
|
|
|
*/ |
|
|
|
|
|
private void deleteClassLoader() |
|
|
|
|
|
{ |
|
|
|
|
|
if (classLoader != null) |
|
|
|
|
|
{ |
|
|
|
|
|
classLoader.cleanup(); |
|
|
|
|
|
classLoader = null; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|
* @since Ant 1.6.2 |
|
|
* @since Ant 1.6.2 |
|
|
|