Skip to content


8308910: Allow executeAndLog to accept running process
Browse files Browse the repository at this point in the history
Reviewed-by: ccheung, iklam
  • Loading branch information
Matias Saavedra Silva committed May 31, 2023
1 parent 25b9803 commit 024d9b1
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions test/lib/jdk/test/lib/cds/
Expand Up @@ -671,11 +671,14 @@ public static void handleCDSRuntimeOptions(ProcessBuilder pb) {

// ============================= Logging
public static OutputAnalyzer executeAndLog(ProcessBuilder pb, String logName) throws Exception {
long started = System.currentTimeMillis();

return executeAndLog(pb.start(), logName);

public static OutputAnalyzer executeAndLog(Process process, String logName) throws Exception {
long started = System.currentTimeMillis();

OutputAnalyzer output = new OutputAnalyzer(pb.start());
OutputAnalyzer output = new OutputAnalyzer(process);
String logFileNameStem =
String.format("%04d", getNextLogCounter()) + "-" + logName;

Expand Down

1 comment on commit 024d9b1

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.