mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-10 20:05:49 +00:00
Bug 1521191, part 2 - Ensure missing leak logs cause mozharness to fail. r=ahal
Depends on D17534 Differential Revision: https://phabricator.services.mozilla.com/D17535 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
0eb5d04802
commit
16351e63ce
25
testing/mochitest/tests/python/files/test_no_leak_log.html
Normal file
25
testing/mochitest/tests/python/files/test_no_leak_log.html
Normal file
@ -0,0 +1,25 @@
|
||||
<!DOCTYPE HTML>
|
||||
<html>
|
||||
<!--
|
||||
https://bugzilla.mozilla.org/show_bug.cgi?id=1343659
|
||||
-->
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>Test Crash</title>
|
||||
<script type="application/javascript" src="/tests/SimpleTest/SimpleTest.js"></script>
|
||||
<link rel="stylesheet" type="text/css" href="/tests/SimpleTest/test.css"/>
|
||||
<script type="application/javascript">
|
||||
SpecialPowers.Cu.disableDumpStatistics();
|
||||
ok(true, "Test is ok");
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<a target="_blank" href="https://bugzilla.mozilla.org/show_bug.cgi?id=1343659">Mozilla Bug 1343659</a>
|
||||
<p id="display"></p>
|
||||
<div id="content" style="display: none">
|
||||
|
||||
</div>
|
||||
<pre id="test">
|
||||
</pre>
|
||||
</body>
|
||||
</html>
|
@ -127,5 +127,15 @@ def test_output_leak(runtests):
|
||||
assert found_leaks, "At least one process should have leaked"
|
||||
|
||||
|
||||
@pytest.mark.skip_mozinfo("!debug")
|
||||
def test_output_no_leak_log(runtests):
|
||||
status, lines = runtests('test_no_leak_log.html')
|
||||
assert status == 0
|
||||
|
||||
tbpl_status, log_level, summary = get_mozharness_status(lines, status)
|
||||
assert tbpl_status == TBPL_WARNING
|
||||
assert log_level == WARNING
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
mozunit.main()
|
||||
|
@ -68,7 +68,12 @@ class StatusHandler(object):
|
||||
self.unexpected_statuses["FAIL"] += 1
|
||||
|
||||
if action == "mozleak_total":
|
||||
if data.get("bytes", 0) > data.get("threshold", 0):
|
||||
data_bytes = data["bytes"]
|
||||
if data_bytes is None:
|
||||
if not (data.get("induced_crash", False) or
|
||||
data.get("ignore_missing", False)):
|
||||
self.unexpected_statuses["FAIL"] += 1
|
||||
elif data_bytes > data.get("threshold", 0):
|
||||
self.unexpected_statuses["FAIL"] += 1
|
||||
|
||||
def summarize(self):
|
||||
|
Loading…
Reference in New Issue
Block a user