faft: Retrieve the recovery reason when a test is trapped in recovery screen

In most of the firmware test failures, it is trapped in the recovery screen.
The test will report a reboot timeout error. It always needs manual rerun and
check the recovery reason again. This CL is to modify the reset logic and try
to retrieve the recovery reason then, such that we can easily check the reason
without rerun.

BUG=chromium-os:23309
TEST=manual

Run a test on a mis-behaved firmware which is trapped in the recovery screen.
$ run_remote_tests.sh --board link --remote dut CorruptBothFwSigAB.*dev

Check the result:
...
14:28:56 INFO | Server: Client machine is offline.
14:32:13 INFO | wait_for_client() timed out.
14:32:14 INFO | Try to retrieve recovery reason...
14:32:24 INFO | Setting usb_mux_sel1 to servo_sees_usbkey
14:32:34 INFO | Setting usb_mux_sel1 to dut_sees_usbkey
14:33:00 INFO | Server: Client machine is up.
...
14:33:15 INFO | Server: Relaunched remote faft.
14:33:15 INFO | Got the recovery reason 19.
14:33:15 INFO | Try cold reboot...
...
  [  FAILED  ]
firmware_CorruptBothFwSigAB.dev                                                       FAIL: Trapped in the recovery reason: 19

Change-Id: I59cfdeccf810f0a9768695517d70ca8a40eed508
Reviewed-on: https://gerrit.chromium.org/gerrit/36537
Reviewed-by: Vic Yang <victoryang@chromium.org>
Commit-Ready: Tom Wai-Hong Tam <waihong@chromium.org>
Tested-by: Tom Wai-Hong Tam <waihong@chromium.org>
1 file changed