Commit 026a0195 authored by John Budorick's avatar John Budorick Committed by Commit Bot

[android] Kill logdog_butler if it doesn't exit within 30s of receiving SIGTERM.

Bug: 721889
Change-Id: I10e0a8abc34dbb6db779343f75d19239622176b3
Reviewed-on: https://chromium-review.googlesource.com/677124Reviewed-by: default avatarBenjamin Pastene <bpastene@chromium.org>
Commit-Queue: John Budorick <jbudorick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503502}
parent b2e18cfe
......@@ -20,6 +20,7 @@ sys.path.append(os.path.join(_SRC_PATH, 'third_party', 'catapult', 'common',
'py_utils'))
from devil.utils import signal_handler
from devil.utils import timeout_retry
from py_utils import tempfile_ext
PROJECT = 'chromium'
......@@ -27,6 +28,8 @@ OUTPUT = 'logdog'
COORDINATOR_HOST = 'luci-logdog.appspot.com'
SERVICE_ACCOUNT_JSON = ('/creds/service_accounts'
'/service-account-luci-logdog-publisher.json')
LOGDOG_TERMINATION_TIMEOUT = 30
def CommandParser():
# Parses the command line arguments being passed in
......@@ -116,8 +119,16 @@ def main():
CreateStopTestsMethod(test_proc)):
result = test_proc.wait()
if logdog_proc:
def logdog_stopped():
return logdog_proc.poll() is not None
logdog_proc.terminate()
logdog_proc.wait()
timeout_retry.WaitFor(logdog_stopped, wait_period=1,
max_tries=LOGDOG_TERMINATION_TIMEOUT)
# If logdog_proc hasn't finished by this point, allow
# NoLeakingProcesses to kill it.
return result
......
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