This is an automated email from the ASF dual-hosted git repository.
bodewig pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/ant.git
The following commit(s) were added to refs/heads/master by this push:
new 84116f8 try to make tests pass inside of Gump
84116f8 is described below
commit 84116f8a5d41fd210b6640fe1b830cf21a8fb84a
Author: Stefan Bodewig <[email protected]>
AuthorDate: Sat Aug 21 10:08:42 2021 +0200
try to make tests pass inside of Gump
---
.../apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
index 32e2179..0e69d9f 100644
---
a/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
+++
b/src/tests/junit/org/apache/tools/ant/taskdefs/optional/junit/JUnitTaskTest.java
@@ -505,7 +505,8 @@ public class JUnitTaskTest {
}
assertTrue("No exports", resExports.isEmpty());
if (project.getProperty(MagicNames.BUILD_SYSCLASSPATH) == null
- && System.getProperty(MagicNames.BUILD_SYSCLASSPATH) == null) {
+ && System.getProperty(MagicNames.BUILD_SYSCLASSPATH) == null
+ && project.getProperty("tests.and.ant.share.classloader") ==
null) {
assertEquals("Expected classpath", cp.toString(), resCp);
}
assertEquals("Expected modulepath", mp.toString(), resMp);
@@ -562,7 +563,8 @@ public class JUnitTaskTest {
}
assertTrue("No exports", resExports.isEmpty());
if (project.getProperty(MagicNames.BUILD_SYSCLASSPATH) == null
- && System.getProperty(MagicNames.BUILD_SYSCLASSPATH) == null) {
+ && System.getProperty(MagicNames.BUILD_SYSCLASSPATH) == null
+ && project.getProperty("tests.and.ant.share.classloader") ==
null) {
assertNull("No classpath", resCp);
}
assertEquals("Expected modulepath", mp.toString(), resMp);
@@ -576,6 +578,8 @@ public class JUnitTaskTest {
LoaderUtils.classNameToResource(Project.class.getName());
final File antclasses = LoaderUtils.getResourceSource(
Project.class.getClassLoader(), projectResourceName);
+ assumeTrue("skipping test as ant is found inside of a jar rather than
a directory",
+ antclasses.isDirectory());
final String testResourceName =
LoaderUtils.classNameToResource(junit.framework.Test.class.getName());
final File junitJar = LoaderUtils.getResourceSource(