зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1629789
- Suppress `fix-stacks` errors on web platform tests. r=erahm,jgraham
Because the web platform test harness doesn't recognize them and annotates them with `CRITICAL`, which is disconcerting, even though those errors are typically not harmful. Differential Revision: https://phabricator.services.mozilla.com/D71485
This commit is contained in:
Родитель
3e3ce6cc06
Коммит
9d10f25a39
|
@ -224,7 +224,7 @@ def test_environment(xrePath, env=None, crashreporter=True, debugger=False,
|
|||
return env
|
||||
|
||||
|
||||
def get_stack_fixer_function(utilityPath, symbolsPath):
|
||||
def get_stack_fixer_function(utilityPath, symbolsPath, hideErrors=False):
|
||||
"""
|
||||
Return a stack fixing function, if possible, to use on output lines.
|
||||
|
||||
|
@ -254,7 +254,7 @@ def get_stack_fixer_function(utilityPath, symbolsPath):
|
|||
|
||||
def stack_fixer_function(line):
|
||||
return stack_fixer_module.fixSymbols(
|
||||
line, slowWarning=True, breakpadSymsDir=symbolsPath)
|
||||
line, slowWarning=True, breakpadSymsDir=symbolsPath, hide_errors=hideErrors)
|
||||
|
||||
elif mozinfo.isLinux or mozinfo.isMac or mozinfo.isWin:
|
||||
# Run each line through fix_stacks.py. This method is preferred for
|
||||
|
@ -262,7 +262,7 @@ def get_stack_fixer_function(utilityPath, symbolsPath):
|
|||
stack_fixer_module = import_stack_fixer_module('fix_stacks')
|
||||
|
||||
def stack_fixer_function(line):
|
||||
return stack_fixer_module.fixSymbols(line, slowWarning=True)
|
||||
return stack_fixer_module.fixSymbols(line, slowWarning=True, hide_errors=hideErrors)
|
||||
|
||||
else:
|
||||
return None
|
||||
|
|
|
@ -428,8 +428,11 @@ class OutputHandler(object):
|
|||
|
||||
self.symbols_path = symbols_path
|
||||
if stackfix_dir:
|
||||
# We hide errors because they cause disconcerting `CRITICAL`
|
||||
# warnings in web platform test output.
|
||||
self.stack_fixer = get_stack_fixer_function(stackfix_dir,
|
||||
self.symbols_path)
|
||||
self.symbols_path,
|
||||
hideErrors=True)
|
||||
else:
|
||||
self.stack_fixer = None
|
||||
self.asan = asan
|
||||
|
|
|
@ -21,7 +21,7 @@ line_re = re.compile("#\d+: .+\[.+ \+0x[0-9A-Fa-f]+\]")
|
|||
fix_stacks = None
|
||||
|
||||
|
||||
def fixSymbols(line, jsonMode=False, slowWarning=False, breakpadSymsDir=None):
|
||||
def fixSymbols(line, jsonMode=False, slowWarning=False, breakpadSymsDir=None, hide_errors=False):
|
||||
global fix_stacks
|
||||
|
||||
result = line_re.search(line)
|
||||
|
@ -59,7 +59,10 @@ def fixSymbols(line, jsonMode=False, slowWarning=False, breakpadSymsDir=None):
|
|||
args.append('-b')
|
||||
args.append(breakpadSymsDir + "," + fileid_exe)
|
||||
|
||||
fix_stacks = Popen(args, stdin=PIPE, stdout=PIPE, stderr=None)
|
||||
# Sometimes we need to prevent errors from going to stderr.
|
||||
stderr = open(os.devnull) if hide_errors else None
|
||||
|
||||
fix_stacks = Popen(args, stdin=PIPE, stdout=PIPE, stderr=stderr)
|
||||
|
||||
if slowWarning:
|
||||
print("Initializing stack-fixing for the first stack frame, this may take a while...")
|
||||
|
|
Загрузка…
Ссылка в новой задаче