Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(238)

Unified Diff: tools/testrunner/local/commands.py

Issue 1177903005: [test] More debugging output in test runner. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/testrunner/local/commands.py
diff --git a/tools/testrunner/local/commands.py b/tools/testrunner/local/commands.py
index 4d74165edbb5f63b54819178b37c30dc1e9f5ff1..6aac3ffad588e561bfc5c6f196664d490bfdd4c8 100644
--- a/tools/testrunner/local/commands.py
+++ b/tools/testrunner/local/commands.py
@@ -26,8 +26,8 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-import os
import subprocess
+import sys
from threading import Timer
from ..local import utils
@@ -73,7 +73,24 @@ def RunProcess(verbose, timeout, args, **rest):
def kill_process(process, timeout_result):
timeout_result[0] = True
try:
- process.kill()
+ if utils.IsWindows():
+ if 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,
+ stderr=subprocess.PIPE,
+ )
+ stdout, stderr = tk.communicate()
+ if verbose:
+ print "Taskkill results for %d" % process.pid
+ print stdout
+ print stderr
+ print "Return code: %d" % tk.returncode
+ sys.stdout.flush()
+ else:
+ process.kill()
except OSError:
sys.stderr.write('Error: Process %s already ended.\n' % process.pid)
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698