[test] Temporary output for investigation

Currently it's hard to reason about the hung tests on worker processes.
This adds simple output when we're trying to kill a hung process.

Change-Id: Iae5e14dac70a8149c074043dd00cbf10e4d5f3de
Reviewed-on: https://chromium-review.googlesource.com/712455
Reviewed-by: Ulan Degenbaev <ulan@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#48460}
This commit is contained in:
Michael Achenbach 2017-10-11 15:49:03 +02:00 committed by Commit Bot
parent dabd1c0af8
commit b269c14616

View File

@ -106,6 +106,11 @@ def RunProcess(verbose, timeout, args, additional_env, **rest):
print "Return code: %d" % tk.returncode
sys.stdout.flush()
else:
if utils.GuessOS() == "macos":
# TODO(machenbach): Temporary output for investigating hanging test
# driver on mac.
print "Attempting to kill process %d - cmd %s" % (process.pid, args)
sys.stdout.flush()
process.kill()
except OSError:
sys.stderr.write('Error: Process %s already ended.\n' % process.pid)