]> source.dussan.org Git - aspectj.git/commitdiff
Bug 150487 "Tracing and Logging Framework" (trace everyting test)
authormwebster <mwebster>
Wed, 16 Aug 2006 14:53:26 +0000 (14:53 +0000)
committermwebster <mwebster>
Wed, 16 Aug 2006 14:53:26 +0000 (14:53 +0000)
tests/src/org/aspectj/systemtest/tracing/TracingTests.java
tests/src/org/aspectj/systemtest/tracing/tracing.xml
tests/tracing/Aspect.aj [new file with mode: 0644]
tests/tracing/ant.xml

index 1eb7924bf48cb0cf9ea0f29c3975c4997bcc1a4a..eced86a4f58eb4e98f89109ec71fbccfb0b1d4b2 100644 (file)
@@ -37,5 +37,9 @@ public class TracingTests extends org.aspectj.testing.XMLBasedAjcTestCase {
        public void testTraceMessages () {
                runTest("Trace messages");
        }
+       
+       public void testTraceEverything () {
+               runTest("Trace everything");
+       }
 
 }
index a9f64bd698ed347e3c4d44b1f5a7fe019aa4fa4a..6a5d4881eb01c95cdcdae3573a1dc1bc5adf51aa 100644 (file)
             </stderr>
         </ant>
     </ajc-test>
+
+       <ajc-test dir="tracing" title="Trace everything" keywords="tracing">
+        <compile
+               files="HelloWorld.java"
+        />
+        <compile files="Aspect.aj" options="-outxml"/>
+               <ant file="ant.xml" target="Trace everything" verbose="true">
+               <stdout>
+                <line text="Hello World!"/>
+            </stdout>
+        </ant>
+    </ajc-test>
 </suite>
diff --git a/tests/tracing/Aspect.aj b/tests/tracing/Aspect.aj
new file mode 100644 (file)
index 0000000..3ecbe82
--- /dev/null
@@ -0,0 +1,5 @@
+public aspect Aspect {
+       before () : within(HelloWorld) {
+               System.err.println(thisJoinPoint);
+       }
+}
\ No newline at end of file
index b0b7a9e17085ce1a770daaf84033074e85e4195f..064eecda052df281970dbbb3e77e36d6e2e0bd07 100644 (file)
         </java>
     </target>
 
+    <target name="Trace everything">
+        <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"/>
+<!--            <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>