Bug 473259 - (Jv1) mochitest-browser-chrome: remove Pass and Fail support now - r=ccooper
authorSerge Gautherie <sgautherie.bz@free.fr>
Wed, 11 Nov 2009 16:32:21 -0500
changeset 486 b091f85c4607
parent 485 d483ab29d8f9
child 487 11c98e6cefa7
push id258
push usercoop@mozilla.com
push date2009-11-11 21:38 +0000
reviewersccooper
bugs473259
Bug 473259 - (Jv1) mochitest-browser-chrome: remove Pass and Fail support now - r=ccooper
steps/unittest.py
--- a/steps/unittest.py
+++ b/steps/unittest.py
@@ -86,19 +86,19 @@ def summarizeLog(name, log, successIdent
     # Regular expression for crash and leak detections.
     harnessErrorsRe = re.compile(r"TEST-UNEXPECTED-FAIL \| .* \| (Browser crashed \(minidump found\)|missing output line for total leaks!|negative leaks caught!|leaked \d+ bytes during test execution)")
     # Process the log.
     for line in log.readlines():
         # Set the counts.
         m = infoRe.match(line)
         if m:
             r = m.group(1)
-            if r == successIdent or (successIdent == "Pass" and r == "Passed"):
+            if r == successIdent:
                 successCount = int(m.group(2))
-            elif r == failureIdent or (failureIdent == "Fail" and r == "Failed"):
+            elif r == failureIdent:
                 failureCount = int(m.group(2))
             # If otherIdent == None, then infoRe should not match it,
             # so this test is fine as is.
             elif r == otherIdent:
                 otherCount = int(m.group(2))
             continue
         # Set the error flags.
         m = harnessErrorsRe.match(line)
@@ -112,27 +112,23 @@ def summarizeLog(name, log, successIdent
                 leaked = True
             # continue
 
     # Return the summary.
     return "TinderboxPrint: %s<br/>%s\n" % (name,
         summaryText(successCount, failureCount, otherCount, crashed, leaked))
 
 def summarizeLogMochitest(name, log):
-    passIdent = "Passed"
-    failIdent = "Failed"
     infoRe = r"\d+ INFO (Passed|Failed|Todo):\ +(\d+)"
     # Support browser-chrome result summary format which differs from MozillaMochitest's.
     if name == 'mochitest-browser-chrome':
-        passIdent = "Pass"
-        failIdent = "Fail"
-        infoRe = r"\t(Pass|Fail|Passed|Failed|Todo): (\d+)"
+        infoRe = r"\t(Passed|Failed|Todo): (\d+)"
 
     return summarizeLog(
-        name, log, passIdent, failIdent, "Todo",
+        name, log, "Passed", "Failed", "Todo",
         infoRe)
 
 def summarizeLogReftest(name, log):
     return summarizeLog(
         name, log, "Successful", "Unexpected", "Known problems",
         r"REFTEST INFO \| (Successful|Unexpected|Known problems): (\d+) \(")
 
 def summarizeLogXpcshelltests(name, log):
@@ -425,17 +421,17 @@ class MozillaMochitest(ShellCommandRepor
         superResult = self.super_class.evaluateCommand(self, cmd)
         if superResult != SUCCESS:
             return WARNINGS
 
         failIdent = r"^\d+ INFO Failed: 0"
         # Support browser-chrome result summary format which differs
         # from MozillaMochitest's.
         if self.name == 'mochitest-browser-chrome':
-            failIdent = r"^\t(Fail|Failed): 0"
+            failIdent = r"^\tFailed: 0"
         # Assume that having the 'failIdent' line
         # means the tests run completed (successfully).
         # Also check for "^TEST-UNEXPECTED-" for harness errors.
         if not re.search(failIdent, cmd.logs["stdio"].getText(), re.MULTILINE) or \
            re.search("^TEST-UNEXPECTED-", cmd.logs["stdio"].getText(), re.MULTILINE):
             return WARNINGS
 
         return SUCCESS
@@ -533,17 +529,17 @@ class MozillaPackagedMochitests(ShellCom
     def evaluateCommand(self, cmd):
         superResult = self.super_class.evaluateCommand(self, cmd)
         if superResult != SUCCESS:
             return superResult
 
         failIdent = r"^\d+ INFO Failed: 0"
         # Support browser-chrome result summary format which differs from MozillaMochitest's.
         if self.name == 'mochitest-browser-chrome':
-            failIdent = r"^\t(Fail|Failed): 0"
+            failIdent = r"^\tFailed: 0"
         # Assume that having the 'failIdent' line
         # means the tests run completed (successfully).
         # Also check for "^TEST-UNEXPECTED-" for harness errors.
         if not re.search(failIdent, cmd.logs["stdio"].getText(), re.MULTILINE) or \
            re.search("^TEST-UNEXPECTED-", cmd.logs["stdio"].getText(), re.MULTILINE):
             return WARNINGS
 
         return SUCCESS