changeset 60:db4410e10574

Print the auxiliary data in HTML report.
author shade
date Thu, 03 Oct 2013 16:08:13 +0400
parents 52dc3f38237c
children 74d878c778c0
files harness/src/main/java/org/openjdk/jcstress/infra/grading/HTMLReportPrinter.java
diffstat 1 files changed, 18 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/harness/src/main/java/org/openjdk/jcstress/infra/grading/HTMLReportPrinter.java	Thu Oct 03 15:36:46 2013 +0400
+++ b/harness/src/main/java/org/openjdk/jcstress/infra/grading/HTMLReportPrinter.java	Thu Oct 03 16:08:13 2013 +0400
@@ -84,7 +84,8 @@
                 Collection<TestResult> mergeable = multiResults.get(name);
 
                 LongHashMultiset<State> stateCounts = new LongHashMultiset<State>();
-                Map<String, String> envs = new HashMap<String, String>();
+
+                List<String> auxData = new ArrayList<String>();
 
                 Status status = Status.NORMAL;
                 Environment env = null;
@@ -94,6 +95,7 @@
                         stateCounts.add(s, s.getCount());
                     }
                     env = r.getEnv();
+                    auxData.addAll(r.getAuxData());
                 }
 
                 TestResult root = new TestResult(name, status);
@@ -104,6 +106,10 @@
 
                 root.setEnv(env);
 
+                for (String data : auxData) {
+                    root.addAuxData(data);
+                }
+
                 results.put(name, root);
             }
         }
@@ -324,6 +330,7 @@
                     output.println("<td class=\"special\">SKIPPED</td>");
                     output.println("<td class=\"special\">Sanity check failed, API mismatch?</td>");
                     break;
+                case TEST_ERROR:
                 case CHECK_TEST_ERROR:
                     output.println("<td class=\"failed\">ERROR</td>");
                     output.println("<td class=\"failed\">Error while running the test</td>");
@@ -435,6 +442,16 @@
         }
 
         output.println("</table>");
+
+        if (!r.getAuxData().isEmpty()) {
+            output.println("<p><b>Auxiliary data</b></p>");
+            output.println("<pre>");
+            for (String data : r.getAuxData()) {
+                output.println(data);
+            }
+            output.println("</pre>");
+            output.println();
+        }
     }
 
     private void parseTestWithoutDescription(PrintWriter output, TestResult r) {