From 1750235414aeb015ba0724c6e2d11623e34c507d Mon Sep 17 00:00:00 2001 From: Fabian Meumertzheim Date: Wed, 18 Oct 2023 16:58:34 +0200 Subject: [PATCH] tests: Restore live output of `java_fuzz_target_test` This broke in 55eb18b20953bea99fa1a5f55668740686f448b3. --- .../code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java b/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java index 7a50be53b..5cdb23a96 100644 --- a/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java +++ b/bazel/tools/java/com/code_intelligence/jazzer/tools/FuzzTargetTestWrapper.java @@ -234,7 +234,8 @@ private static boolean verifyFuzzerOutput( throws IOException { List lines; try (BufferedReader reader = new BufferedReader(new InputStreamReader(fuzzerOutput))) { - lines = reader.lines().collect(toList()); + // Print the lines as they are read to get live updates on the console. + lines = reader.lines().peek(System.err::println).collect(toList()); } List warningsAndErrors = @@ -263,7 +264,6 @@ private static boolean verifyFuzzerOutput( List stackTrace = lines.stream() - .peek(System.err::println) .filter( line -> line.startsWith(EXCEPTION_PREFIX)