Skip to content


8308910: Allow executeAndLog to accept running process
Browse files Browse the repository at this point in the history
Reviewed-by: lucy
Backport-of: 024d9b131d6c2d5ee6c8cafdb05b9e9e299d588e
  • Loading branch information
GoeLin committed Oct 26, 2023
1 parent f85053f commit fc28856
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/lib/jdk/test/lib/cds/
Expand Up @@ -594,8 +594,12 @@ public static File getSourceFile(String name) {

// ============================= Logging
public static OutputAnalyzer executeAndLog(ProcessBuilder pb, String logName) throws Exception {
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 fc28856

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.