From bfaea3bfd17dad4cd30309504bcfb8edfa7dd146 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Kubitz?= Date: Tue, 17 Sep 2024 07:49:25 +0200 Subject: [PATCH] [test] jdi: fix AutomatedSuite default classpath to run in i-build And log errors to std.out, since std.err is collected to another logfile --- .../org/eclipse/debug/jdi/tests/AbstractJDITest.java | 10 +++++----- .../debug/jdi/tests/ClassPrepareEventWaiter.java | 1 - 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java index 3ecc7415d4..3e79fc883d 100644 --- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java +++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/AbstractJDITest.java @@ -124,8 +124,8 @@ public AbstractJDITest(String name) { try { String cp = MainClass.class.getProtectionDomain().getCodeSource().getLocation().toURI().getPath(); System.out.println("MainClass path=" + cp); - if (new File(cp).isDirectory() && !cp.endsWith(File.separatorChar + "/bin/" + File.separatorChar)) { - cp += "bin/" + File.separatorChar; + if (new File(cp).isDirectory() && !cp.endsWith(File.separatorChar + "bin" + File.separatorChar)) { + cp += "bin" + File.separatorChar; } fClassPath = new File(cp).getAbsolutePath(); } catch (URISyntaxException e) { @@ -980,7 +980,7 @@ protected static boolean parseArgs(String[] args) { vmLauncherName = "DefaultVMLauncher"; } - String classPath = new File("./bin").getAbsolutePath(); + String classPath = fClassPath; String bootPath = ""; String vmType = "?"; boolean verbose = false; @@ -1219,7 +1219,7 @@ private void startConsoleReaders() { fConsoleErrorReader = new NullConsoleReader( "JDI Tests Console Error Reader", - fLaunchedVM.getErrorStream(), System.err); + fLaunchedVM.getErrorStream(), System.out); } fConsoleErrorReader.start(); @@ -1251,7 +1251,7 @@ private void startConsoleReaders() { fProxyErrorReader = new NullConsoleReader( "JDI Tests Proxy Error Reader", - fLaunchedProxy.getErrorStream(), System.err); + fLaunchedProxy.getErrorStream(), System.out); } fProxyErrorReader.start(); } diff --git a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventWaiter.java b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventWaiter.java index 22b776e655..12c6211d0c 100644 --- a/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventWaiter.java +++ b/org.eclipse.jdt.debug.jdi.tests/tests/org/eclipse/debug/jdi/tests/ClassPrepareEventWaiter.java @@ -35,7 +35,6 @@ public ClassPrepareEventWaiter(EventRequest request, boolean shouldGo, String cl */ @Override public boolean classPrepare(ClassPrepareEvent event) { - System.out.println("classPrepare:" + event + " " + event.referenceType().name()); if (event.referenceType().name().equals(fClassName)) { notifyEvent(event); return fShouldGo;