Bug 792173 - Add TEST-UNEXPECTED-FAIL output to Marionette, r=mdas, DONTBUILD because NPOTB
authorJonathan Griffin <jgriffin@mozilla.com>
Thu, 20 Sep 2012 15:09:57 -0700
changeset 107701 5dde4b86acfbfc2cee6c11840a9f2f58feef0f12
parent 107700 2e6335deeb512ced664701d20622ef898e6fb82d
child 107705 f731fa718465e7cfc252c0acf1aeec35913d7123
push id82
push usershu@rfrn.org
push dateFri, 05 Oct 2012 13:20:22 +0000
reviewersmdas, DONTBUILD
bugs792173
milestone18.0a1
Bug 792173 - Add TEST-UNEXPECTED-FAIL output to Marionette, r=mdas, DONTBUILD because NPOTB
testing/marionette/client/marionette/runtests.py
--- a/testing/marionette/client/marionette/runtests.py
+++ b/testing/marionette/client/marionette/runtests.py
@@ -73,16 +73,26 @@ class MarionetteTestResult(unittest._Tex
     def getPerfData(self, test):
         for testcase in test._tests:
             if testcase.perfdata:
                 if not self.perfdata:
                     self.perfdata = datazilla.DatazillaResult(testcase.perfdata)
                 else:
                     self.perfdata.join_results(testcase.perfdata)
 
+    def printErrorList(self, flavour, errors):
+        for test, err in errors:
+            self.stream.writeln(self.separator1)
+            self.stream.writeln("%s: %s" % (flavour,self.getDescription(test)))
+            self.stream.writeln(self.separator2)
+            errlines = err.strip().split('\n')
+            for line in errlines[0:-1]:
+                self.stream.writeln("%s" % line)
+            self.stream.writeln("TEST-UNEXPECTED-FAIL : %s" % errlines[-1])
+
 
 class MarionetteTextTestRunner(unittest.TextTestRunner):
 
     resultclass = MarionetteTestResult
 
     def __init__(self, **kwargs):
         self.perf = kwargs['perf']
         del kwargs['perf']