]> source.dussan.org Git - aspectj.git/commitdiff
Bug 153907 "Facilitate LTW testing in a custom ClassLoader hierarchy" (fix build...
authormwebster <mwebster>
Wed, 16 Aug 2006 09:57:32 +0000 (09:57 +0000)
committermwebster <mwebster>
Wed, 16 Aug 2006 09:57:32 +0000 (09:57 +0000)
lib/test/testing-client.jar
testing-client/src/org/aspectj/testing/server/TestServer.java
testing-client/testsrc/org/aspectj/testing/server/TestServerTest.java
testing/newsrc/org/aspectj/testing/AntSpec.java

index cac1fe9bfe7370ccce9d766345d86e020c0b00b7..42c85210f9af42778363a82bcedd1052bbbe7ecd 100644 (file)
Binary files a/lib/test/testing-client.jar and b/lib/test/testing-client.jar differ
index 4e2f153886d71e4bd5f611ac9fa98392dd07f8fc..c21aeed9776aa474e8e3fb26ca1c78cd04e76ca8 100644 (file)
@@ -34,8 +34,8 @@ public class TestServer implements Runnable {
        private ClassLoader rootLoader;
        private Map loaders = new HashMap();
 
-       private String mainClass = "UnknowClass";
-       private String mainLoader = "UnknowLoader";
+       private String mainClass = "UnknownClass";
+       private String mainLoader = "UnknownLoader";
        
        public void initialize () throws IOException {
                createRootLoader();
index f0f043e676226284c635bace1a2761584caab1d5..0c278588e2dfe5acfa04449b679f4c3fc01df0ac 100644 (file)
@@ -26,7 +26,7 @@ public class TestServerTest extends TestCase {
 
        public void testInitialize() {
                try {
-                       server.setWorkingDirectory("./testdata");
+                       server.setWorkingDirectory("../testing-client/testdata");
                        server.initialize();
                }
                catch (IOException ex) {
@@ -35,6 +35,6 @@ public class TestServerTest extends TestCase {
        }
 
        public void testSetWorkingDirectory() {
-               server.setWorkingDirectory("./testdata");
+               server.setWorkingDirectory("../testing-client/testdata");
        }
 }
index 8ea86cdb5e5d75c05998cfee357e9d028feabaf0..da83578fa4b144374fb72921d905fbdd353de20c 100644 (file)
@@ -73,6 +73,7 @@ public class AntSpec implements ITestStep {
         Project p = new Project();
         final StringBuffer stdout = new StringBuffer();
         final StringBuffer stderr = new StringBuffer();
+        final StringBuffer verboseLog = new StringBuffer();
         try {
             // read the Ant file
             p.init();
@@ -101,7 +102,13 @@ public class AntSpec implements ITestStep {
                 public void buildFinished(BuildEvent event) {
                     super.buildFinished(event);
                     if (event.getException() != null) {
-                        AjcTestCase.fail(failMessage + "failure " + event.getException());
+                       StringBuffer message = new StringBuffer();
+                       message.append(event.getException().toString()).append("\n");
+                       message.append(verboseLog);
+                       message.append(stdout);
+                       message.append(stderr);
+//                        AjcTestCase.fail(failMessage + "failure " + event.getException());
+                        AjcTestCase.fail(message.toString());
                     }
                 }
                 public void targetFinished(BuildEvent event) {
@@ -122,6 +129,9 @@ public class AntSpec implements ITestStep {
                        case Project.MSG_WARN:
                                stderr.append(event.getMessage()).append('\n');
                                break;
+                       case Project.MSG_VERBOSE:
+                               verboseLog.append(event.getMessage()).append('\n');
+                               break;
                     }
                 }
             };