aboutsummaryrefslogtreecommitdiff
path: root/compiler/test/dotty/tools/dotc/ParallelSummaryReport.java
diff options
context:
space:
mode:
authorFelix Mulder <felix.mulder@gmail.com>2017-04-12 12:21:30 +0200
committerGitHub <noreply@github.com>2017-04-12 12:21:30 +0200
commitd541452940007bbc094e8a7f6785b6f8e9e7da22 (patch)
treefa5d9fd6b11fe9284ccff9c841a95598dc8e43d2 /compiler/test/dotty/tools/dotc/ParallelSummaryReport.java
parent741ee1645a13c94fbb7edfd064b4ec092a69b1bf (diff)
parentf6d519ab713cac49c6228f142cc4ccfc8880ef10 (diff)
downloaddotty-d541452940007bbc094e8a7f6785b6f8e9e7da22.tar.gz
dotty-d541452940007bbc094e8a7f6785b6f8e9e7da22.tar.bz2
dotty-d541452940007bbc094e8a7f6785b6f8e9e7da22.zip
Merge pull request #2194 from dotty-staging/topic/hydra-part-2
Killing partest part 2 - Enter the Vulpix
Diffstat (limited to 'compiler/test/dotty/tools/dotc/ParallelSummaryReport.java')
-rw-r--r--compiler/test/dotty/tools/dotc/ParallelSummaryReport.java73
1 files changed, 0 insertions, 73 deletions
diff --git a/compiler/test/dotty/tools/dotc/ParallelSummaryReport.java b/compiler/test/dotty/tools/dotc/ParallelSummaryReport.java
deleted file mode 100644
index 5608b3656..000000000
--- a/compiler/test/dotty/tools/dotc/ParallelSummaryReport.java
+++ /dev/null
@@ -1,73 +0,0 @@
-package dotty.tools.dotc;
-
-import org.junit.BeforeClass;
-import org.junit.AfterClass;
-import java.util.ArrayDeque;
-
-import dotty.tools.dotc.reporting.TestReporter;
-import dotty.tools.dotc.reporting.TestReporter$;
-
-/** Note that while `ParallelTesting` runs in parallel, JUnit tests cannot with
- * this class
- */
-public class ParallelSummaryReport {
- 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;
- private static int failed;
-
- public final static void reportFailed() {
- failed++;
- }
-
- public final static void reportPassed() {
- passed++;
- }
-
- public final static void addFailedTest(String msg) {
- failedTests.offer(msg);
- }
-
- public final static void addReproduceInstruction(String msg) {
- reproduceInstructions.offer(msg);
- }
-
- @BeforeClass public final static void setup() {
- rep = TestReporter.reporter(System.out, -1);
- failedTests = new ArrayDeque<>();
- reproduceInstructions = new ArrayDeque<>();
- }
-
- @AfterClass public final static void teardown() {
- rep.echo(
- "\n================================================================================" +
- "\nTest Report" +
- "\n================================================================================" +
- "\n" +
- passed + " passed, " + failed + " failed, " + (passed + failed) + " total" +
- "\n"
- );
-
- failedTests
- .stream()
- .map(x -> " " + x)
- .forEach(rep::echo);
-
- // If we're compiling locally, we don't need reproduce instructions
- if (isInteractive) rep.flushToStdErr();
-
- rep.echo("");
-
- reproduceInstructions
- .stream()
- .forEach(rep::echo);
-
- // If we're on the CI, we want everything
- if (!isInteractive) rep.flushToStdErr();
-
- if (failed > 0) rep.flushToFile();
- }
-}