Commit fad1c1c9 authored by Michael Achenbach's avatar Michael Achenbach Committed by Commit Bot

[test] Be more chatty when killing hanging tests

Bug: v8:8292
Change-Id: I74fd304692e90adfb694b73ecf5e7858e3b66607
Reviewed-on: https://chromium-review.googlesource.com/c/1275814Reviewed-by: 's avatarSergiy Byelozyorov <sergiyb@chromium.org>
Reviewed-by: 's avatarMaya Lekova <mslekova@chromium.org>
Commit-Queue: Michael Achenbach <machenbach@chromium.org>
Cr-Commit-Position: refs/heads/master@{#56562}
parent 25f1fe91
......@@ -127,9 +127,15 @@ class BaseCommand(object):
def _abort(self, process, abort_called):
abort_called[0] = True
try:
print 'Attempting to kill process %d' % process.pid
sys.stdout.flush()
self._kill_process(process)
except OSError:
pass
print 'Attempted to kill process %d' % process.pid
sys.stdout.flush()
except OSError as e:
print 'Error killing process %d' % process.pid
print e
sys.stdout.flush()
def __str__(self):
return self.to_string()
......@@ -186,9 +192,6 @@ class WindowsCommand(BaseCommand):
return subprocess.list2cmdline(self._to_args_list())
def _kill_process(self, process):
if self.verbose:
print 'Attempting to kill process %d' % process.pid
sys.stdout.flush()
tk = subprocess.Popen(
'taskkill /T /F /PID %d' % process.pid,
stdout=subprocess.PIPE,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment