mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-14 05:45:37 +00:00
Bug 1333049 - Remove leakcheck hack from mochitest harness, r=jmaher
MozReview-Commit-ID: LIamko4HHrX --HG-- extra : rebase_source : 655041e576ee70fe23ee80ad00a87890a1883592
This commit is contained in:
parent
c197835bcf
commit
e93314dd2a
@ -826,7 +826,6 @@ class MochitestDesktop(object):
|
|||||||
self.result = {}
|
self.result = {}
|
||||||
|
|
||||||
self.start_script = os.path.join(here, 'start_desktop.js')
|
self.start_script = os.path.join(here, 'start_desktop.js')
|
||||||
self.disable_leak_checking = False
|
|
||||||
|
|
||||||
def update_mozinfo(self):
|
def update_mozinfo(self):
|
||||||
"""walk up directories to find mozinfo.json update the info"""
|
"""walk up directories to find mozinfo.json update the info"""
|
||||||
@ -1509,7 +1508,6 @@ toolbar#nav-bar {
|
|||||||
self.log.error(str(e))
|
self.log.error(str(e))
|
||||||
return None
|
return None
|
||||||
|
|
||||||
if not self.disable_leak_checking:
|
|
||||||
browserEnv["XPCOM_MEM_BLOAT_LOG"] = self.leak_report_file
|
browserEnv["XPCOM_MEM_BLOAT_LOG"] = self.leak_report_file
|
||||||
|
|
||||||
try:
|
try:
|
||||||
@ -1953,13 +1951,12 @@ toolbar#nav-bar {
|
|||||||
args.append('-foreground')
|
args.append('-foreground')
|
||||||
self.start_script_kwargs['testUrl'] = testUrl or 'about:blank'
|
self.start_script_kwargs['testUrl'] = testUrl or 'about:blank'
|
||||||
|
|
||||||
if detectShutdownLeaks and not self.disable_leak_checking:
|
if detectShutdownLeaks:
|
||||||
shutdownLeaks = ShutdownLeaks(self.log)
|
shutdownLeaks = ShutdownLeaks(self.log)
|
||||||
else:
|
else:
|
||||||
shutdownLeaks = None
|
shutdownLeaks = None
|
||||||
|
|
||||||
if mozinfo.info["asan"] and (mozinfo.isLinux or mozinfo.isMac) \
|
if mozinfo.info["asan"] and (mozinfo.isLinux or mozinfo.isMac):
|
||||||
and not self.disable_leak_checking:
|
|
||||||
lsanLeaks = LSANLeaks(self.log)
|
lsanLeaks = LSANLeaks(self.log)
|
||||||
else:
|
else:
|
||||||
lsanLeaks = None
|
lsanLeaks = None
|
||||||
@ -2231,28 +2228,6 @@ toolbar#nav-bar {
|
|||||||
result = 1 # default value, if no tests are run.
|
result = 1 # default value, if no tests are run.
|
||||||
for d in dirs:
|
for d in dirs:
|
||||||
print("dir: %s" % d)
|
print("dir: %s" % d)
|
||||||
|
|
||||||
# BEGIN LEAKCHECK HACK
|
|
||||||
# Leak checking was broken in mochitest unnoticed for a length of time. During
|
|
||||||
# this time, several leaks slipped through. The leak checking was fixed by bug
|
|
||||||
# 1325148, but it couldn't land until all the regressions were also fixed or
|
|
||||||
# backed out. Rather than waiting and risking new regressions, in the meantime
|
|
||||||
# this code will selectively disable leak checking on flavors/directories where
|
|
||||||
# known regressions exist. At least this way we can prevent further damage while
|
|
||||||
# they get fixed.
|
|
||||||
|
|
||||||
skip_leak_conditions = []
|
|
||||||
|
|
||||||
for condition, reason in skip_leak_conditions:
|
|
||||||
if condition:
|
|
||||||
self.log.warning('WARNING | disabling leakcheck due to {}'.format(reason))
|
|
||||||
self.disable_leak_checking = True
|
|
||||||
break
|
|
||||||
else:
|
|
||||||
self.disable_leak_checking = False
|
|
||||||
|
|
||||||
# END LEAKCHECK HACK
|
|
||||||
|
|
||||||
tests_in_dir = [t for t in testsToRun if os.path.dirname(t) == d]
|
tests_in_dir = [t for t in testsToRun if os.path.dirname(t) == d]
|
||||||
|
|
||||||
# If we are using --run-by-dir, we should not use the profile path (if) provided
|
# If we are using --run-by-dir, we should not use the profile path (if) provided
|
||||||
|
Loading…
Reference in New Issue
Block a user