summaryrefslogtreecommitdiffstats
path: root/testing/src
diff options
context:
space:
mode:
authorwisberg <wisberg>2003-05-24 09:28:09 +0000
committerwisberg <wisberg>2003-05-24 09:28:09 +0000
commitfa54cdad52ea4870b467f91c20631769901b2921 (patch)
treea3881864ebd6773a0ccd612d64257df8bc6539bd /testing/src
parent7e3b3f9016cb0ceb3a15bb3fab1669e34b1a0ef1 (diff)
downloadaspectj-fa54cdad52ea4870b467f91c20631769901b2921.tar.gz
aspectj-fa54cdad52ea4870b467f91c20631769901b2921.zip
supporting -ajctaskCompiler option with AjcTaskCompileCommand
Diffstat (limited to 'testing/src')
-rw-r--r--testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java17
1 files changed, 12 insertions, 5 deletions
diff --git a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java
index ee17c6f79..80798e1a8 100644
--- a/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java
+++ b/testing/src/org/aspectj/testing/harness/bridge/CompilerRun.java
@@ -21,6 +21,7 @@ import org.aspectj.testing.ajde.CompileCommand;
import org.aspectj.testing.run.IRunIterator;
import org.aspectj.testing.run.IRunStatus;
import org.aspectj.testing.run.WrappedRunIterator;
+import org.aspectj.testing.taskdefs.AjcTaskCompileCommand;
import org.aspectj.testing.xml.SoftMessage;
import org.aspectj.testing.xml.XMLWriter;
import org.aspectj.util.FileUtil;
@@ -62,6 +63,8 @@ import java.util.ListIterator;
*/
public class CompilerRun implements IAjcRun {
static final String AJDE_COMPILER = CompileCommand.class.getName();
+ static final String AJCTASK_COMPILER
+ = AjcTaskCompileCommand.class.getName();
static final String[] RA_String = new String[0];
@@ -472,7 +475,7 @@ public class CompilerRun implements IAjcRun {
"-usejavac", "-preprocess",
"-Xlint", "-lenient", "-strict",
"-source14", "-verbose", "-emacssym",
- "-ajc", "-eclipse", "-ajdeCompiler",
+ "-ajc", "-eclipse", "-ajdeCompiler", "-ajctaskCompiler",
"-ignoreWarnings",
// XXX consider adding [!^]ajdeCompiler
"!usejavac", "!preprocess",
@@ -915,10 +918,9 @@ public class CompilerRun implements IAjcRun {
} else {
result.result = true;
}
- } else if (!ReflectionFactory.ECLIPSE.equals(result.compilerName)
- && !AJDE_COMPILER.equals(result.compilerName)) {
- result.failureReason = "unrecognized compiler: " + result.compilerName;
- } else {
+ } else if (ReflectionFactory.ECLIPSE.equals(result.compilerName)
+ || AJDE_COMPILER.equals(result.compilerName)
+ || AJCTASK_COMPILER.equals(result.compilerName)) {
badOptions = LangUtil.selectOptions(argList, Spec.INVALID_ECLIPSE_OPTIONS);
if (!LangUtil.isEmpty(badOptions)) {
result.failureReason = "no support in eclipse-based compiler"
@@ -926,6 +928,8 @@ public class CompilerRun implements IAjcRun {
} else {
result.result = true;
}
+ } else {
+ result.failureReason = "unrecognized compiler: " + result.compilerName;
}
if (result.result) {
result.commandOptions = argList;
@@ -958,6 +962,9 @@ public class CompilerRun implements IAjcRun {
if ("-ajdeCompiler".equals(arg)) {
result.compilerName = AJDE_COMPILER;
return true;
+ } else if ("-ajctaskCompiler".equals(arg)) {
+ result.compilerName = AJCTASK_COMPILER;
+ return true;
} else if ("-eclipse".equals(arg) || "!eclipse".equals(arg) || "^ajc".equals(arg)) {
result.compilerName = ReflectionFactory.ECLIPSE;
return true;