Bug 1591678 - [mozlog] Ensure missing leak totals count as a failure in the StatusHandler, r=gbrown

Differential Revision: https://phabricator.services.mozilla.com/D82794
This commit is contained in:
Andrew Halberstadt 2020-07-09 03:59:26 +00:00
parent bd28d23ce6
commit 6774848e15

View file

@ -76,7 +76,13 @@ class StatusHandler(object):
self.unexpected_statuses["FAIL"] += 1
if action == "mozleak_total":
if data.get("bytes", 0) > data.get("threshold", 0):
if data["bytes"] is None:
# We didn't see a line with the name 'TOTAL'. That's ok if
# there was an induced crash or 'ignore_missing' was set.
if not (data.get('induced_crash') or data.get('ignore_missing')):
self.unexpected_statuses["FAIL"] += 1
elif data["bytes"] > data.get("threshold", 0):
self.unexpected_statuses["FAIL"] += 1
def summarize(self):