firmware_ECBootTime: Retry EC reboot several times

This is a fragile test because it is expecting to find a very
specific string in the early EC console output after a reboot.
Usually this is OK but with a system that supports USB PD there
can be interrupts in the console output at boot that obscure
the string it is looking to find if the charger is plugged in
because USB PD traffic will be happening early in boot.

This change does two things:
1) Retry the "reboot ap-off" command and regex search in the
console output up to 10 times before failing.
2) Fail gracefully from this test by powering up the device
if it fails so that it is ready for the next test in a suite.

BUG=chrome-os-partner:50294
TEST=pass 100 iterations of firmware_ECBootTime on a chell
device with a charger attached.

Change-Id: I612d210834cfdebbfbe1c944044322282387aeba
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/327696
Reviewed-by: danny chan <dchan@chromium.org>
1 file changed