From: mwebster Date: Wed, 16 Aug 2006 09:57:32 +0000 (+0000) Subject: Bug 153907 "Facilitate LTW testing in a custom ClassLoader hierarchy" (fix build... X-Git-Tag: post_pr_153572~12 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=f37ab9ecfd9e34a7957eafba8e7bf577710ac18b;p=aspectj.git Bug 153907 "Facilitate LTW testing in a custom ClassLoader hierarchy" (fix build break and improve diagnostics) --- diff --git a/lib/test/testing-client.jar b/lib/test/testing-client.jar index cac1fe9bf..42c85210f 100644 Binary files a/lib/test/testing-client.jar and b/lib/test/testing-client.jar differ diff --git a/testing-client/src/org/aspectj/testing/server/TestServer.java b/testing-client/src/org/aspectj/testing/server/TestServer.java index 4e2f15388..c21aeed97 100644 --- a/testing-client/src/org/aspectj/testing/server/TestServer.java +++ b/testing-client/src/org/aspectj/testing/server/TestServer.java @@ -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(); diff --git a/testing-client/testsrc/org/aspectj/testing/server/TestServerTest.java b/testing-client/testsrc/org/aspectj/testing/server/TestServerTest.java index f0f043e67..0c278588e 100644 --- a/testing-client/testsrc/org/aspectj/testing/server/TestServerTest.java +++ b/testing-client/testsrc/org/aspectj/testing/server/TestServerTest.java @@ -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"); } } diff --git a/testing/newsrc/org/aspectj/testing/AntSpec.java b/testing/newsrc/org/aspectj/testing/AntSpec.java index 8ea86cdb5..da83578fa 100644 --- a/testing/newsrc/org/aspectj/testing/AntSpec.java +++ b/testing/newsrc/org/aspectj/testing/AntSpec.java @@ -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; } } };