[test] Be more chatty when killing hanging tests
Bug: v8:8292 Change-Id: I74fd304692e90adfb694b73ecf5e7858e3b66607 Reviewed-on: https://chromium-review.googlesource.com/c/1275814 Reviewed-by: Sergiy Byelozyorov <sergiyb@chromium.org> Reviewed-by: Maya Lekova <mslekova@chromium.org> Commit-Queue: Michael Achenbach <machenbach@chromium.org> Cr-Commit-Position: refs/heads/master@{#56562}
This commit is contained in:
parent
25f1fe9166
commit
fad1c1c94f
@ -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,
|
||||
|
Loading…
Reference in New Issue
Block a user