Autotest: Test servo device before using.

We have seen incidents where we can connect to the beaglebone's
xmlrpc server but when we try to interact with the servo device,
the call hangs for long amounts of time (~20 mins) and the
beaglebone is no longer reachable.

In order to prevent us from stalling our reimaging jobs, we now
ensure the beaglebone can interact with the servo and wrap this
call with a timeout. If it fails, the _connect_servod call errors
out and we won't get stuck waiting on servo calls.

BUG=chromium:255645,chromium:244981,chromium:221883,chromium:241228
TEST=local setup. Interacted with a host with a bad beagleone and
ensured the new test call to it indeed times out.

Change-Id: I3e9915d35eeb26cdd09774ff86ac3b78258c4439
Reviewed-on: https://gerrit.chromium.org/gerrit/62404
Reviewed-by: Fang Deng <fdeng@chromium.org>
Reviewed-by: Richard Barnette <jrbarnette@chromium.org>
Commit-Queue: Simran Basi <sbasi@chromium.org>
Tested-by: Simran Basi <sbasi@chromium.org>
1 file changed