Bug 1421799 - [reftest] Log 'GECKO(<pid>)' instead of 'ProcessReader' for process_output log actions r=gbrown

MozReview-Commit-ID: FsKg5Gtwx9Z

--HG--
extra : rebase_source : 0b012271e1673b641c4514714f0ab68b42d2bd0d
This commit is contained in:
Andrew Halberstadt 2017-12-06 14:11:55 -05:00
parent df1aa1417d
commit 0b44c941df
2 changed files with 5 additions and 1 deletions

View File

@ -128,6 +128,7 @@ class OutputHandler(object):
def __init__(self, log, utilityPath, symbolsPath=None):
self.stack_fixer_function = get_stack_fixer_function(utilityPath, symbolsPath)
self.log = log
self.proc_name = None
def __call__(self, line):
# need to return processed messages to appease remoteautomation.py
@ -151,4 +152,5 @@ class OutputHandler(object):
def verbatim(self, line):
if self.stack_fixer_function:
line = self.stack_fixer_function(line)
self.log.process_output(threading.current_thread().name, line)
name = self.proc_name or threading.current_thread().name
self.log.process_output(name, line)

View File

@ -713,6 +713,7 @@ class RefTest(object):
interactive=interactive,
outputTimeout=timeout)
proc = runner.process_handler
outputHandler.proc_name = 'GECKO({})'.format(proc.pid)
# Used to defer a possible IOError exception from Marionette
marionette_exception = None
@ -749,6 +750,7 @@ class RefTest(object):
status = runner.wait()
runner.process_handler = None
outputHandler.proc_name = None
if status:
msg = "TEST-UNEXPECTED-FAIL | %s | application terminated with exit code %s" % \