summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-24 16:13:43 +0000
committertonyg@chromium.org <tonyg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-24 16:13:43 +0000
commitccbc3a541514d913c3a40693c08b1b3a572d3dd5 (patch)
treef474c6b13cb1a8414e01cc318cae84910fa6569b
parenta687cf1ba0bb74988ada462bb75a2ae728a1d152 (diff)
downloadchromium_src-ccbc3a541514d913c3a40693c08b1b3a572d3dd5.zip
chromium_src-ccbc3a541514d913c3a40693c08b1b3a572d3dd5.tar.gz
chromium_src-ccbc3a541514d913c3a40693c08b1b3a572d3dd5.tar.bz2
Fix quitting web page replay on windows.
Windows. only supports SIGTERM. BUG=None TEST=Manual on windows and linux Review URL: https://codereview.chromium.org/11233074 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@163837 0039d316-1c4b-4281-b951-d872f2087c98
-rwxr-xr-xchrome/test/functional/webpagereplay.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/chrome/test/functional/webpagereplay.py b/chrome/test/functional/webpagereplay.py
index 919c9fe..c6d3350 100755
--- a/chrome/test/functional/webpagereplay.py
+++ b/chrome/test/functional/webpagereplay.py
@@ -161,9 +161,12 @@ class ReplayServer(object):
"""Stop Web Page Replay."""
if self.replay_process:
logging.debug('Stopping Web-Page-Replay')
- # Use a SIGINT here so that it can do graceful cleanup.
- # Otherwise, we will leave subprocesses hanging.
- self.replay_process.send_signal(signal.SIGINT)
+ # Use a SIGINT so that it can do graceful cleanup. On Windows, we are left
+ # with no other option than terminate().
+ try:
+ self.replay_process.send_signal(signal.SIGINT)
+ except:
+ self.replay_process.terminate()
self.replay_process.wait()
if self.log_fh:
self.log_fh.close()