Attempt to avoid timing out after successful iOS test runs by catching SIGTERM.

The test runner is sent SIGTERM typically 30s before the hard timeout
of a test run; knowing that, this CL attempts to catch that SIGTERM
and force kill a hung test process, allowing it to exit more gracefully.
(See:
https://cs.chromium.org/chromium/infra/luci/appengine/swarming/swarming_bot/bot_code/bot_main.py?l=891&rcl=599029f4b1abebfa812f3b2b9df9a5c6c7acbca4)

This should not affect the success/failure of a run, as that is
determined by "TEST EXECUTION SUCCEEDED" appearing in the stdout
for a test run. Return code is noted but not used for success.

I also add some minor logging in this CL for clarity.

Change-Id: I5ec882862db6693f09f69f6e191261f2c6ba43f9
Bug: 898549
Reviewed-on: https://chromium-review.googlesource.com/c/1448684
Commit-Queue: ericale <ericale@chromium.org>
Reviewed-by: Sergey Berezin <sergeyberezin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#628935}
2 files changed