changeset 334:20e3489cdc20

Runners: print messages in text report.
author shade
date Fri, 21 Oct 2016 20:23:48 +0200
parents 744601228ec7
children 5415383d3d3e
files jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ConsoleReportPrinter.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ReportUtils.java jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/TextReportPrinter.java
diffstat 3 files changed, 12 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ConsoleReportPrinter.java	Fri Oct 21 20:20:06 2016 +0200
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ConsoleReportPrinter.java	Fri Oct 21 20:23:48 2016 +0200
@@ -121,13 +121,7 @@
             ReportUtils.printDetails(output, r, true);
         }
 
-        if (!r.getAuxData().isEmpty()) {
-            output.println("    Messages: ");
-            for (String data : r.getAuxData()) {
-                output.println("        " + data);
-            }
-            output.println();
-        }
+        ReportUtils.printMessages(output, r);
 
         printProgress();
     }
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ReportUtils.java	Fri Oct 21 20:20:06 2016 +0200
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/ReportUtils.java	Fri Oct 21 20:23:48 2016 +0200
@@ -156,6 +156,16 @@
         pw.println();
     }
 
+    public static void printMessages(PrintWriter pw, TestResult r) {
+        if (!r.getAuxData().isEmpty()) {
+            pw.println("    Messages: ");
+            for (String data : r.getAuxData()) {
+                pw.println("        " + data);
+            }
+            pw.println();
+        }
+    }
+
     public static String statusToLabel(TestResult result) {
         switch (result.status()) {
             case TIMEOUT_ERROR:
--- a/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/TextReportPrinter.java	Fri Oct 21 20:20:06 2016 +0200
+++ b/jcstress-core/src/main/java/org/openjdk/jcstress/infra/grading/TextReportPrinter.java	Fri Oct 21 20:23:48 2016 +0200
@@ -124,6 +124,7 @@
         emittedTests.add(result);
         pw.printf("%10s %s\n", "[" + ReportUtils.statusToLabel(result) + "]", StringUtils.chunkName(result.getName()));
         ReportUtils.printDetails(pw, result, false);
+        ReportUtils.printMessages(pw, result);
     }
 
 }