Bug 1090148 - [mozlog] Remove test class from HTML formatter. r=cmanchester
authorDave Hunt <dhunt@mozilla.com>
Wed, 05 Nov 2014 10:44:19 +0000
changeset 214081 c891f30c5a5f645a8ad8628697748e28a78dd8c7
parent 214080 9144f7b6791624f474216300c9a2d23c6f36e30d
child 214082 054bd325286d46da8596538afb8122c19aa9f157
push id27771
push userryanvm@gmail.com
push dateWed, 05 Nov 2014 19:04:24 +0000
treeherdermozilla-central@305b4fecce99 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerscmanchester
bugs1090148
milestone36.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 1090148 - [mozlog] Remove test class from HTML formatter. r=cmanchester
testing/mozbase/mozlog/mozlog/structured/formatters/html/html.py
testing/mozbase/mozlog/mozlog/structured/formatters/html/style.css
--- a/testing/mozbase/mozlog/mozlog/structured/formatters/html/html.py
+++ b/testing/mozbase/mozlog/mozlog/structured/formatters/html/html.py
@@ -89,18 +89,16 @@ class HTMLFormatter(base.BaseFormatter):
 
     def test_start(self, data):
         self.start_times[data["test"]] = data["time"]
 
     def test_end(self, data):
         self.make_result_html(data)
 
     def make_result_html(self, data):
-        cls_name = ""
-        tc_name = unicode(data["test"])
         tc_time = (data["time"] - self.start_times.pop(data["test"])) / 1000.
         additional_html = []
         debug = data.get("extra", {})
         links_html = []
 
         status = status_name = data["status"]
         expected = data.get("expected", status)
 
@@ -144,19 +142,18 @@ class HTMLFormatter(base.BaseFormatter):
                         log.append(html.span(raw(cgi.escape(line)), class_='error'))
                     else:
                         log.append(raw(cgi.escape(line)))
                 log.append(html.br())
             additional_html.append(log)
 
         self.result_rows.append(
             html.tr([html.td(status_name, class_='col-result'),
-                     html.td(cls_name, class_='col-class'),
-                     html.td(tc_name, class_='col-name'),
-                     html.td("%.2f" % tc_time, class_='col-duration'),
+                     html.td(data['test'], class_='col-name'),
+                     html.td('%.2f' % tc_time, class_='col-duration'),
                      html.td(links_html, class_='col-links'),
                      html.td(additional_html, class_='debug')],
                     class_=status_name.lower() + ' results-table-row'))
 
     def generate_html(self):
         generated = datetime.utcnow()
         with open(os.path.join(base_path, "main.js")) as main_f:
             doc = html.html(
@@ -184,15 +181,14 @@ class HTMLFormatter(base.BaseFormatter):
                            html.span('%i expected failures' % self.test_count["EXPECTED_FAIL"],
                                      class_='expected_fail'), ', ',
                            html.span('%i unexpected passes' % self.test_count["UNEXPECTED_PASS"],
                                      class_='unexpected_pass'), '.'),
                     html.h2('Results'),
                     html.table([html.thead(
                         html.tr([
                             html.th('Result', class_='sortable', col='result'),
-                            html.th('Class', class_='sortable', col='class'),
-                            html.th('Test Name', class_='sortable', col='name'),
+                            html.th('Test', class_='sortable', col='name'),
                             html.th('Duration', class_='sortable numeric', col='duration'),
                             html.th('Links')]), id='results-table-head'),
                         html.tbody(self.result_rows, id='results-table-body')], id='results-table')))
 
         return u"<!DOCTYPE html>\n" + doc.unicode(indent=2)
--- a/testing/mozbase/mozlog/mozlog/structured/formatters/html/style.css
+++ b/testing/mozbase/mozlog/mozlog/structured/formatters/html/style.css
@@ -39,32 +39,26 @@ table {
 }
 
 /******************************
  * TEST RESULT COLORS
  ******************************/
 span.pass, .pass .col-result {
 	color: green;
 }
-span.expected_fail, .expected_fail .col-result {
-	color: orange;
-}
+span.expected_fail, .expected_fail .col-result,
 span.skip, .skip .col-result {
 	color: orange;
 }
-span.unexpected_pass, .unexpected_pass .col-result {
+span.fail, .fail .col-result,
+span.unexpected_fail, .unexpected_fail .col-result,
+span.unexpected_pass, .unexpected_pass .col-result,
+span.error,.error .col-result {
 	color: red;
 }
-span.fail, .fail .col-result {
-	color: red;
-}
-span.error,.error .col-result  {
-	color: red;
-}
-
 
 /******************************
  * RESULTS TABLE
  * 
  * 1. Table Layout
  * 2. Debug
  * 3. Sorting items
  *