diff options
author | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-04-16 13:52:07 +0700 |
---|---|---|
committer | Alexander Kriegisch <Alexander@Kriegisch.name> | 2021-04-16 13:52:07 +0700 |
commit | 0e7ac59f24f449d6d54d31634075f9bffcb57588 (patch) | |
tree | 2b180ca1a7c3652b78b05bae3645e9b5bdd32ee8 /org.aspectj.ajdt.core | |
parent | 1602d79a829c060c37d0e9627909a8f3638bfd79 (diff) | |
download | aspectj-0e7ac59f24f449d6d54d31634075f9bffcb57588.tar.gz aspectj-0e7ac59f24f449d6d54d31634075f9bffcb57588.zip |
Remove some cruft from test classes Ajc, AjcTestCase, AntSpec
Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'org.aspectj.ajdt.core')
-rw-r--r-- | org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/Ajc.java | 64 | ||||
-rw-r--r-- | org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/AjcTestCase.java | 9 |
2 files changed, 14 insertions, 59 deletions
diff --git a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/Ajc.java b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/Ajc.java index 138e6538c..b6abb38ab 100644 --- a/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/Ajc.java +++ b/org.aspectj.ajdt.core/src/test/java/org/aspectj/tools/ajc/Ajc.java @@ -51,64 +51,28 @@ public class Ajc { private static final String BUILD_OUTPUT_FOLDER = "target"; public static final String outputFolder(String module) { - return File.pathSeparator + ".." +File.separator + module + File.separator + "target" + File.separator + "classes"; + return File.pathSeparator + ".." +File.separator + module + File.separator + BUILD_OUTPUT_FOLDER + File.separator + "classes"; } public static final String outputFolders(String... modules) { StringBuilder s = new StringBuilder(); for (String module: modules) { - s.append(File.pathSeparator + ".." +File.separator + module + File.separator + "target" + File.separator + "classes"); + s.append(File.pathSeparator + ".." +File.separator + module + File.separator + BUILD_OUTPUT_FOLDER + File.separator + "classes"); } return s.toString(); } // ALSO SEE ANTSPEC AND AJCTESTCASE - private static final String TESTER_PATH = outputFolder("testing-client") + outputFolder("runtime") + outputFolder("bcel-builder") - // + File.pathSeparator + ".." + File.separator + "runtime" + File.separator + BUILD_OUTPUT_FOLDER // - // + File.pathSeparator + ".." + File.separator + "aspectj5rt" + File.separator + BUILD_OUTPUT_FOLDER // - + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "junit" + File.separator + "junit.jar" // - // + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "bcel" + File.separator + "bcel.jar" // - // + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "bcel" + File.separator - // + "bcel-verifier.jar" + - - + outputFolder("bridge") - + outputFolder("loadtime") - + outputFolder("weaver") - + outputFolder("org.aspectj.matcher") - + outputFolder("bridge"); - // File.pathSeparator + ".." + File.separator + "bridge" + File.separator + "bin" + File.pathSeparator + ".." - // + File.separator + "loadtime" + File.separator + "bin" + File.pathSeparator - // + ".." - // + File.separator - // + "weaver" - // + File.separator - // + "bin" - // + File.pathSeparator - // + ".." - // + File.separator - // + "weaver5" - // + File.separator - // + "bin" - // + File.pathSeparator - // + ".." - // + File.separator - // + "org.aspectj.matcher" - // + File.separator - // + "bin" - - // When the build machine executes the tests, it is using code built into jars rather than code build into - // bin directories. This means for the necessary types to be found we have to put these jars on the classpath: - // + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "bridge.jar" - // + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator - // + "org.aspectj.matcher.jar" + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" - // + File.separator + "util.jar" + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" - // + File.separator + "loadtime.jar" + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" - // + File.separator + "weaver.jar" + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" - // + File.separator + "weaver5.jar" + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" - // + File.separator + "asm.jar" + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "test" - // + File.separator + "testing-client.jar" - // // hmmm, this next one should perhaps point to an aj-build jar... - // + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "test" + File.separator + "aspectjrt.jar"; + private static final String TESTER_PATH = + outputFolder("testing-client") + + outputFolder("runtime") + + outputFolder("bcel-builder") + + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "junit" + File.separator + "junit.jar" + + outputFolder("bridge") + + outputFolder("loadtime") + + outputFolder("weaver") + + outputFolder("org.aspectj.matcher") + + outputFolder("bridge"); private CompilationResult result; private File sandbox; @@ -238,8 +202,8 @@ public class Ajc { addMessagesTo(errors, holder.getErrors()); addMessagesTo(fails, holder.getMessages(IMessage.FAIL, true)); addMessagesTo(weaves, holder.getMessages(IMessage.WEAVEINFO, false)); - String stdOut = new String(out.toByteArray()); - String stdErr = new String(err.toByteArray()); + String stdOut = out.toString(); + String stdErr = err.toString(); result = new CompilationResult(args, stdOut, stdErr, infos, errors, warnings, fails, weaves); } finally { System.setOut(systemOut); 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 e13f9e224..6a93731a5 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 @@ -77,15 +77,6 @@ public abstract class AjcTestCase extends TestCase { + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "bcel" + File.separator + "bcel.jar" + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "bcel" + File.separator + "bcel-verifier.jar" + File.pathSeparator + CLASSPATH_ASM_RENAMED - // When the build machine executes the tests, it is using code built into jars rather than code build into - // target/classes directories. This means for the necessary types to be found we have to put these jars on the classpath: - + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "bridge.jar" - + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "util.jar" - + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "org.aspectj.matcher.jar" - + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "loadtime.jar" - + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "weaver.jar" - + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" - + File.pathSeparator + ".." + File.separator + "aj-build" + File.separator + "jars" + File.separator + "asm.jar" + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "test" + File.separator + "testing-client.jar" // hmmm, this next one should perhaps point to an aj-build jar... + File.pathSeparator + ".." + File.separator + "lib" + File.separator + "test" + File.separator + "aspectjrt.jar" |