aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoraclement <aclement>2006-11-22 10:24:34 +0000
committeraclement <aclement>2006-11-22 10:24:34 +0000
commitbb14e258c5d1769b3987a2e11f02c29f90f30e36 (patch)
treef9c7c811d012001e58a2d7ddec4b39555593a350
parent1f00a6ff06de145c9072aca7e16c6a1d5a4ea4e0 (diff)
downloadaspectj-bb14e258c5d1769b3987a2e11f02c29f90f30e36.tar.gz
aspectj-bb14e258c5d1769b3987a2e11f02c29f90f30e36.zip
tests and implementation for 165153: outputting aspectj trace to a named file
-rw-r--r--tests/src/org/aspectj/systemtest/tracing/TracingTests.java8
-rw-r--r--tests/src/org/aspectj/systemtest/tracing/tracing.xml12
-rw-r--r--tests/tracing/ant.xml14
3 files changed, 34 insertions, 0 deletions
diff --git a/tests/src/org/aspectj/systemtest/tracing/TracingTests.java b/tests/src/org/aspectj/systemtest/tracing/TracingTests.java
index a0164d305..c144e48e8 100644
--- a/tests/src/org/aspectj/systemtest/tracing/TracingTests.java
+++ b/tests/src/org/aspectj/systemtest/tracing/TracingTests.java
@@ -45,5 +45,13 @@ public class TracingTests extends org.aspectj.testing.XMLBasedAjcTestCase {
public void testJDK14Tracing_pr159854 () {
runTest("JDK 1.4 tracing");
}
+
+ public void testTracingFileSystemProperty () {
+ runTest("Tracing file System Property");
+
+ File dir = getSandboxDirectory();
+ File file = new File(dir,"tracing.txt");
+ assertTrue("Missing tracing file: " + file,file.exists());
+ }
}
diff --git a/tests/src/org/aspectj/systemtest/tracing/tracing.xml b/tests/src/org/aspectj/systemtest/tracing/tracing.xml
index 7a1405a78..122dbe28a 100644
--- a/tests/src/org/aspectj/systemtest/tracing/tracing.xml
+++ b/tests/src/org/aspectj/systemtest/tracing/tracing.xml
@@ -84,4 +84,16 @@
</stdout>
</ant>
</ajc-test>
+
+ <ajc-test dir="tracing" title="Tracing file System Property" keywords="tracing">
+ <compile
+ files="HelloWorld.java"
+ />
+ <compile files="Aspect.aj" options="-outxml"/>
+ <ant file="ant.xml" target="Tracing file System Property" verbose="true">
+ <stdout>
+ <line text="Hello World!"/>
+ </stdout>
+ </ant>
+ </ajc-test>
</suite>
diff --git a/tests/tracing/ant.xml b/tests/tracing/ant.xml
index 8e7ddad18..f41252dcc 100644
--- a/tests/tracing/ant.xml
+++ b/tests/tracing/ant.xml
@@ -63,4 +63,18 @@
</java>
</target>
+ <target name="Tracing file System Property">
+ <java fork="yes" classname="HelloWorld" failonerror="yes">
+ <classpath refid="aj.path"/>
+ <jvmarg value="-Dorg.aspectj.tracing.enabled=true"/>
+ <jvmarg value="-Dorg.aspectj.tracing.factory=default"/>
+ <jvmarg value="-Dorg.aspectj.tracing.messages=true"/>
+ <sysproperty key="org.aspectj.tracing.file" path="${aj.sandbox}/tracing.txt"/>
+<!-- <jvmarg value="-verbose:class"/>-->
+ <!-- use META-INF/aop.xml style -->
+ <jvmarg value="-javaagent:${aj.root}/lib/test/loadtime5.jar"/>
+<!-- <jvmarg line="${jdwp}"/>-->
+ </java>
+ </target>
+
</project>