Bug 1587139 - Improve mozharness search for test failure patterns; r=bc
authorGeoff Brown <gbrown@mozilla.com>
Tue, 08 Oct 2019 21:56:34 +0000
changeset 559187 c5f0a88c97f81eb55b14d8bb445c108a468716a2
parent 559186 ab675f6a7e263a8dd3003056eb7b1eb681951d3d
child 559188 a13a70f7bb6e5618724dd3baff03b8166d73d249
push id12175
push userccoroiu@mozilla.com
push dateThu, 17 Oct 2019 19:29:09 +0000
treeherdermozilla-beta@d333b6ef1fd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersbc
bugs1587139
milestone71.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 1587139 - Improve mozharness search for test failure patterns; r=bc When searching for "harness errors" as defined by the regexes at https://searchfox.org/mozilla-central/rev/5cb522c7baba24e55874809e0e206b001494c1e9/testing/mozharness/mozharness/mozilla/testing/errors.py#112 use re.search rather than re.match so that any logging prefixes do not defeat the match. Differential Revision: https://phabricator.services.mozilla.com/D48598
testing/mozharness/mozharness/mozilla/testing/unittest.py
--- a/testing/mozharness/mozharness/mozilla/testing/unittest.py
+++ b/testing/mozharness/mozharness/mozilla/testing/unittest.py
@@ -145,23 +145,23 @@ class DesktopUnittestOutputParser(Output
                         message += '\n One or more unittests failed.'
                         log_level = WARNING
                 # If self.summary_suite_re['known_fail_group'] == None,
                 # then r should not match it, # so this test is fine as is.
                 elif self.summary_suite_re['known_fail_group'] in r:
                     self.known_fail_count = int(summary_match_list[-1])
                 self.log(message, log_level)
                 return  # skip harness check and base parse_single_line
-        harness_match = self.harness_error_re.match(line)
+        harness_match = self.harness_error_re.search(line)
         if harness_match:
             self.warning(' %s' % line)
             self.worst_log_level = self.worst_level(WARNING, self.worst_log_level)
             self.tbpl_status = self.worst_level(TBPL_WARNING, self.tbpl_status,
                                                 levels=TBPL_WORST_LEVEL_TUPLE)
-            full_harness_match = self.full_harness_error_re.match(line)
+            full_harness_match = self.full_harness_error_re.search(line)
             if full_harness_match:
                 r = full_harness_match.group(1)
                 if r == "application crashed":
                     self.crashed = True
                 elif r == "missing output line for total leaks!":
                     self.leaked = None
                 else:
                     self.leaked = True