mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-09 03:15:11 +00:00
Bug 1678282 - Redirect subprocess output to mozlog in testing/mochitest/runtests.py r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D97559
This commit is contained in:
parent
bbfaa4e2e8
commit
d7875803f2
@ -382,7 +382,18 @@ def call(*args, **kwargs):
|
||||
"""front-end function to mozprocess.ProcessHandler"""
|
||||
# TODO: upstream -> mozprocess
|
||||
# https://bugzilla.mozilla.org/show_bug.cgi?id=791383
|
||||
process = mozprocess.ProcessHandler(*args, **kwargs)
|
||||
log = get_proxy_logger("mochitest")
|
||||
|
||||
def on_output(line):
|
||||
log.process_output(
|
||||
process=process.pid,
|
||||
data=line.decode("utf8", "replace"),
|
||||
command=process.commandline,
|
||||
)
|
||||
|
||||
process = mozprocess.ProcessHandlerMixin(
|
||||
*args, processOutputLine=on_output, **kwargs
|
||||
)
|
||||
process.run()
|
||||
return process.wait()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user