aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2022-03-24 15:25:37 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2022-03-24 15:25:37 +0700
commit3ddb113287f28521ee3471ec4fce99253dbf58dd (patch)
treea2f477f20295efcf995bbcd09d2ae145a352026c
parent50190a1918e66769e0037542054645add1ff8204 (diff)
downloadaspectj-3ddb113287f28521ee3471ec4fce99253dbf58dd.tar.gz
aspectj-3ddb113287f28521ee3471ec4fce99253dbf58dd.zip
Add JDT Core and bcel-builder to test classpath
At present, no tests are failing without those resources, but for good measure, I added them anyway, because then the same path could in the future also be used for stand-alone compilation tests which are not triggered in-process via AJDT interface but, not unlike "full LTW" test execution mode, in a separate JVM. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
-rw-r--r--org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java11
1 files changed, 9 insertions, 2 deletions
diff --git a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java
index e0533b008..7a1ad855b 100644
--- a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java
+++ b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java
@@ -73,6 +73,12 @@ public abstract class AjcTestCase extends TestCase {
.filter(path -> path.replace('\\', '/').contains("org/ow2/asm/"))
.findFirst()
.orElseThrow(() -> new RuntimeException("ASM library not found on classpath"));
+ public static final String CLASSPATH_JDT_CORE =
+ Arrays.stream(System.getProperty("java.class.path")
+ .split(pathSeparator))
+ .filter(path -> path.replace('\\', '/').contains("/org/aspectj/org.eclipse.jdt.core/"))
+ .findFirst()
+ .orElseThrow(() -> new RuntimeException("AspectJ JDT Core library not found on classpath"));
public static final String CLASSPATH_JUNIT =
Arrays.stream(System.getProperty("java.class.path")
.split(pathSeparator))
@@ -90,10 +96,11 @@ public abstract class AjcTestCase extends TestCase {
// See Ajc and AntSpec
public static final String DEFAULT_CLASSPATH_ENTRIES =
- DEFAULT_FULL_LTW_CLASSPATH_ENTRIES +
- Ajc.outputFolders("bridge", "util", "loadtime", "weaver", "asm", "runtime", "org.aspectj.matcher")
+ DEFAULT_FULL_LTW_CLASSPATH_ENTRIES
+ + Ajc.outputFolders("bridge", "util", "loadtime", "weaver", "asm", "runtime", "org.aspectj.matcher", "bcel-builder")
+ pathSeparator + ".." + separator + "lib" + separator + "bcel" + separator + "bcel.jar"
+ pathSeparator + ".." + separator + "lib" + separator + "bcel" + separator + "bcel-verifier.jar"
+ + pathSeparator + CLASSPATH_JDT_CORE
+ pathSeparator + CLASSPATH_ASM
// hmmm, this next one should perhaps point to an aj-build jar...
+ pathSeparator + ".." + separator + "lib" + separator + "test" + separator + "aspectjrt.jar"