Skip to content

Commit

Permalink
[test] jdi: fix AutomatedSuite default classpath
Browse files Browse the repository at this point in the history
to run in i-build

And log errors to std.out, since std.err is collected to another logfile
  • Loading branch information
EcljpseB0T authored and jukzi committed Sep 17, 2024
1 parent 53b619b commit 1cf449b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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();

Expand Down Expand Up @@ -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();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 1cf449b

Please sign in to comment.