[autotest] adding a timeout to retry decorator.
Use signal.SIGALRM to prevent retry method from hang
signal.SIGALRM is used to timeout retry method after a given amount of
time. The default timeout value is set to timeout_min, which is used as
timeout value in minutes until all retries give up.
BUG=chromium-os:34424
TEST=run unit test retry_unittest.py
Change-Id: I88f24f281cc1b8f9cb82ba10aae31a8345722d28
Reviewed-on: https://gerrit.chromium.org/gerrit/40095
Reviewed-by: Craig Harrison <craigdh@chromium.org>
Reviewed-by: Alex Miller <milleral@chromium.org>
Commit-Queue: Dan Shi <dshi@chromium.org>
Tested-by: Dan Shi <dshi@chromium.org>
2 files changed