summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
authorpam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-22 03:57:46 +0000
committerpam@chromium.org <pam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-02-22 03:57:46 +0000
commit036c24fa2e050d0a781f21ea6f68aeada9f28e94 (patch)
tree80eb048509e50bcfa6aaa0a6e02fed1cf5b196a2 /tools
parentb7f0588eacdc379330d315c68b749130d1f2ed2f (diff)
downloadchromium_src-036c24fa2e050d0a781f21ea6f68aeada9f28e94.zip
chromium_src-036c24fa2e050d0a781f21ea6f68aeada9f28e94.tar.gz
chromium_src-036c24fa2e050d0a781f21ea6f68aeada9f28e94.tar.bz2
Add diagnostic information to help track down why the Purify layout tests
are occasionally hanging and can't be killed. TBR=erikkay BUG=7834 TEST=none Review URL: http://codereview.chromium.org/27039 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10156 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools')
-rw-r--r--tools/purify/common.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/purify/common.py b/tools/purify/common.py
index b0b587c..25b552f 100644
--- a/tools/purify/common.py
+++ b/tools/purify/common.py
@@ -83,6 +83,8 @@ def RunSubprocess(proc, timeout=0, detach=False):
# TODO(erikkay): should we buffer stderr and stdout separately?
p = subprocess.Popen(proc, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
+ logging.info("started subprocess")
+
# How long to wait (in seconds) before printing progress log messages.
progress_delay = 300
progress_delay_time = time.time() + progress_delay
@@ -111,6 +113,11 @@ def RunSubprocess(proc, timeout=0, detach=False):
did_timeout = time.time() > wait_until
if did_timeout:
+ logging.info("process timed out")
+ else:
+ logging.info("process ended, did not time out")
+
+ if did_timeout:
subprocess.call(["taskkill", "/T", "/F", "/PID", str(p.pid)])
logging.error("KILLED %d" % p.pid)
# Give the process a chance to actually die before continuing
@@ -121,8 +128,10 @@ def RunSubprocess(proc, timeout=0, detach=False):
elif not detach:
for line in p.stdout.readlines():
_print_line(line, False)
+ logging.info("flushing stdout")
p.stdout.flush()
+ logging.info("collecting result code")
result = p.poll()
if result:
logging.error("%s exited with non-zero result code %d" % (proc[0], result))