Bug 1020625 - Don't call structured logging's suite_start and suite_end per test suite. r=jgraham
authorChris Manchester <cmanchester@mozilla.com>
Mon, 09 Jun 2014 12:01:26 -0400
changeset 190129 af526a65b9afcc8f47288ab5faf9eb24b9e1d7d0
parent 190014 ae6f7d5a01b3bb63d40ae2365a9fee061bf49006
child 190130 38476bd452850c2407059c9e176c02bd3ec2019a
push id7411
push userkwierso@gmail.com
push dateTue, 24 Jun 2014 02:07:45 +0000
treeherderfx-team@cc4602e0c1d8 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjgraham
bugs1020625
milestone33.0a1
Bug 1020625 - Don't call structured logging's suite_start and suite_end per test suite. r=jgraham
testing/mozbase/moztest/moztest/adapters/unit.py
testing/mozbase/moztest/setup.py
--- a/testing/mozbase/moztest/moztest/adapters/unit.py
+++ b/testing/mozbase/moztest/moztest/adapters/unit.py
@@ -28,27 +28,33 @@ class StructuredTestResult(TextTestResul
         debug_info = {}
         for callback in self.result_callbacks:
             info = callback(test, status)
             if info is not None:
                 debug_info.update(info)
         return debug_info
 
     def startTestRun(self):
-        self.logger.suite_start(tests=self.test_list)
+        # This would be an opportunity to call the logger's suite_start action,
+        # however some users may use multiple suites, and per the structured
+        # logging protocol, this action should only be called once.
+        pass
 
     def startTest(self, test):
         self.testsRun += 1
         self.logger.test_start(test.id())
 
     def stopTest(self, test):
         pass
 
     def stopTestRun(self):
-        self.logger.suite_end()
+        # This would be an opportunity to call the logger's suite_end action,
+        # however some users may use multiple suites, and per the structured
+        # logging protocol, this action should only be called once.
+        pass
 
     def addError(self, test, err):
         self.errors.append((test, self._exc_info_to_string(err, test)))
         extra = self.call_callbacks(test, "ERROR")
         self.logger.test_end(test.id(),
                              "ERROR",
                              message=self._exc_info_to_string(err, test),
                              expected="PASS",
--- a/testing/mozbase/moztest/setup.py
+++ b/testing/mozbase/moztest/setup.py
@@ -1,15 +1,15 @@
 # This Source Code Form is subject to the terms of the Mozilla Public
 # License, v. 2.0. If a copy of the MPL was not distributed with this file,
 # You can obtain one at http://mozilla.org/MPL/2.0/.
 
 from setuptools import setup, find_packages
 
-PACKAGE_VERSION = '0.5'
+PACKAGE_VERSION = '0.6'
 
 # dependencies
 deps = ['mozinfo']
 
 setup(name='moztest',
       version=PACKAGE_VERSION,
       description="Package for storing and outputting Mozilla test results",
       long_description="see http://mozbase.readthedocs.org/",