From 44d56611ddc3724aec7f21c41821c50ed2b702c9 Mon Sep 17 00:00:00 2001 From: Goetz Lindenmaier Date: Tue, 24 Oct 2023 12:09:48 +0200 Subject: [PATCH] Backport 024d9b131d6c2d5ee6c8cafdb05b9e9e299d588e --- test/lib/jdk/test/lib/cds/CDSTestUtils.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/test/lib/jdk/test/lib/cds/CDSTestUtils.java b/test/lib/jdk/test/lib/cds/CDSTestUtils.java index 9840da9fa89..4ebe2491584 100644 --- a/test/lib/jdk/test/lib/cds/CDSTestUtils.java +++ b/test/lib/jdk/test/lib/cds/CDSTestUtils.java @@ -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;