diff --git a/compiler/test/dotty/tools/vulpix/ChildJVMMain.java b/compiler/test/dotty/tools/vulpix/ChildJVMMain.java index ce9aebf719e1..9cc14d473262 100644 --- a/compiler/test/dotty/tools/vulpix/ChildJVMMain.java +++ b/compiler/test/dotty/tools/vulpix/ChildJVMMain.java @@ -9,6 +9,7 @@ import java.lang.reflect.Method; public class ChildJVMMain { + static final String MessageStart = "##THIS IS THE START FOR ME, HELLO##"; static final String MessageEnd = "##THIS IS THE END FOR ME, GOODBYE##"; private static void runMain(String dir) throws Exception { @@ -23,6 +24,9 @@ private static void runMain(String dir) throws Exception { Class cls = ucl.loadClass("Test"); Method meth = cls.getMethod("main", String[].class); Object[] args = new Object[]{ new String[]{ "jvm" } }; + + System.out.println(MessageStart); + meth.invoke(null, args); } diff --git a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala index 94bc9eb3275b..767e92fc584e 100644 --- a/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala +++ b/compiler/test/dotty/tools/vulpix/RunnerOrchestration.scala @@ -118,7 +118,13 @@ trait RunnerOrchestration { if (childStdout eq null) childStdout = new BufferedReader(new InputStreamReader(process.getInputStream)) - var childOutput = childStdout.readLine() + var childOutput: String = childStdout.readLine() + + // Discard all messages until the test starts + while (childOutput != ChildJVMMain.MessageStart && childOutput != null) + childOutput = childStdout.readLine() + childOutput = childStdout.readLine() + while (childOutput != ChildJVMMain.MessageEnd && childOutput != null) { sb.append(childOutput) sb += '\n'