diff options
Diffstat (limited to 'compiler/test/dotty/tools/dotc/ParallelSummaryReport.java')
-rw-r--r-- | compiler/test/dotty/tools/dotc/ParallelSummaryReport.java | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/compiler/test/dotty/tools/dotc/ParallelSummaryReport.java b/compiler/test/dotty/tools/dotc/ParallelSummaryReport.java index 9214e7d25..5608b3656 100644 --- a/compiler/test/dotty/tools/dotc/ParallelSummaryReport.java +++ b/compiler/test/dotty/tools/dotc/ParallelSummaryReport.java @@ -11,7 +11,9 @@ import dotty.tools.dotc.reporting.TestReporter$; * this class */ public class ParallelSummaryReport { - private static TestReporter rep = TestReporter.reporter(-1); + public final static boolean isInteractive = !System.getenv().containsKey("DRONE"); + + private static TestReporter rep = TestReporter.reporter(System.out, -1); private static ArrayDeque<String> failedTests = new ArrayDeque<>(); private static ArrayDeque<String> reproduceInstructions = new ArrayDeque<>(); private static int passed; @@ -34,7 +36,7 @@ public class ParallelSummaryReport { } @BeforeClass public final static void setup() { - rep = TestReporter.reporter(-1); + rep = TestReporter.reporter(System.out, -1); failedTests = new ArrayDeque<>(); reproduceInstructions = new ArrayDeque<>(); } @@ -54,7 +56,8 @@ public class ParallelSummaryReport { .map(x -> " " + x) .forEach(rep::echo); - rep.flushToStdErr(); + // If we're compiling locally, we don't need reproduce instructions + if (isInteractive) rep.flushToStdErr(); rep.echo(""); @@ -62,6 +65,9 @@ public class ParallelSummaryReport { .stream() .forEach(rep::echo); + // If we're on the CI, we want everything + if (!isInteractive) rep.flushToStdErr(); + if (failed > 0) rep.flushToFile(); } } |