Bug 1421799 - [reftest] Log 'GECKO(<pid>)' instead of 'ProcessReader' for process_output log actions r=gbrown
☠☠ backed out by 61190fb11108 ☠ ☠
authorAndrew Halberstadt <ahalberstadt@mozilla.com>
Wed, 06 Dec 2017 14:11:55 -0500
changeset 396392 bbe4d2292f86e4f3994f11496f1850f2851a2b63
parent 396391 979ceb379e0b2eebaa01514b24fbb7418e6b2747
child 396393 afe14ec646ab15c8824e0b52f523f1a038113ec5
push id56978
push userahalberstadt@mozilla.com
push dateThu, 14 Dec 2017 13:00:31 +0000
treeherderautoland@7fb20bced076 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersgbrown
bugs1421799
milestone59.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1421799 - [reftest] Log 'GECKO(<pid>)' instead of 'ProcessReader' for process_output log actions r=gbrown MozReview-Commit-ID: FsKg5Gtwx9Z
layout/tools/reftest/output.py
layout/tools/reftest/runreftest.py
--- a/layout/tools/reftest/output.py
+++ b/layout/tools/reftest/output.py
@@ -123,16 +123,17 @@ class OutputHandler(object):
     """Process the output of a process during a test run and translate
     raw data logged from reftest.js to an appropriate structured log action,
     where applicable.
     """
 
     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
         if not line.strip():
             return []
         line = line.decode('utf-8', errors='replace')
 
         try:
@@ -146,9 +147,10 @@ class OutputHandler(object):
         else:
             self.verbatim(json.dumps(data))
 
         return [data]
 
     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)
--- a/layout/tools/reftest/runreftest.py
+++ b/layout/tools/reftest/runreftest.py
@@ -708,16 +708,17 @@ class RefTest(object):
                             process_class=mozprocess.ProcessHandlerMixin,
                             cmdargs=cmdargs,
                             env=env,
                             process_args=kp_kwargs)
         runner.start(debug_args=debug_args,
                      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
 
         if self.use_marionette:
             marionette_args = {
                 'socket_timeout': options.marionette_socket_timeout,
                 'startup_timeout': options.marionette_startup_timeout,
@@ -744,16 +745,17 @@ class RefTest(object):
                 # wrong with the process, like a crash or the socket is no
                 # longer open. We defer raising this specific error so that
                 # post-test checks for leaks and crashes are performed and
                 # reported first.
                 marionette_exception = sys.exc_info()
 
         status = runner.wait()
         runner.process_handler = None
+        outputHandler.proc_name = None
 
         if status:
             msg = "TEST-UNEXPECTED-FAIL | %s | application terminated with exit code %s" % \
                 (self.lastTestSeen, status)
             # use process_output so message is logged verbatim
             self.log.process_output(None, msg)
         else:
             self.lastTestSeen = self.TEST_SEEN_FINAL