Bug 1370359 - Stop dumping all tests to errorsummary.log; include manifest in error lines, r=jgraham
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Tue, 06 Jun 2017 15:05:17 -0400
changeset 411122 09b1aee5ad9fb7c1e884036985576121b4a67766
parent 411121 189df493159bb85b1bfe566ce609ceb0ed254c43
child 411123 634b361b1b9db2b26d64a5944c7ebaa88fd5991a
push id7391
push usermtabara@mozilla.com
push dateMon, 12 Jun 2017 13:08:53 +0000
treeherdermozilla-beta@2191d7f87e2e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1370359
milestone55.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1370359 - Stop dumping all tests to errorsummary.log; include manifest in error lines, r=jgraham MozReview-Commit-ID: 9m0ArgifgU9
testing/mozbase/mozlog/mozlog/formatters/errorsummary.py
--- a/testing/mozbase/mozlog/mozlog/formatters/errorsummary.py
+++ b/testing/mozbase/mozlog/mozlog/formatters/errorsummary.py
@@ -5,39 +5,42 @@
 import json
 
 from base import BaseFormatter
 
 
 class ErrorSummaryFormatter(BaseFormatter):
 
     def __init__(self):
+        self.groups = None
         self.line_count = 0
 
     def __call__(self, data):
         rv = BaseFormatter.__call__(self, data)
         self.line_count += 1
         return rv
 
     def _output(self, data_type, data):
         data["action"] = data_type
         data["line"] = self.line_count
         return "%s\n" % json.dumps(data)
 
     def _output_test(self, test, subtest, item):
         data = {"test": test,
                 "subtest": subtest,
+                "group": self.groups.get(test, ''),
                 "status": item["status"],
                 "expected": item["expected"],
                 "message": item.get("message"),
                 "stack": item.get("stack")}
         return self._output("test_result", data)
 
     def suite_start(self, item):
-        return self._output("test_groups", {"tests": item["tests"]})
+        self.groups = {v: k for k in item["tests"] for v in item["tests"][k]}
+        return self._output("test_groups", {"groups": item["tests"].keys()})
 
     def test_status(self, item):
         if "expected" not in item:
             return
         return self._output_test(item["test"], item["subtest"], item)
 
     def test_end(self, item):
         if "expected" not in item: