cros_ec_softrec_power: Add regexp after commands.

The power state driver should really verify that the commands it issues
actually take effect before continuing forward with execution.

This commit adds checks for the EC reset cause string which will be
printed after a reboot and the events string which will be printed after
setting or clearing hostevents.  Execution blocks until those strings
are seen before utimately timing out if an error occurs.

BUG=chrome-os-partner:55790
BRANCH=None
TEST=`dut-control power_state:off && dut-control power_state:rec` for
ultima and cyan.  Verified that DUT boots into recovery mode.

CQ-DEPEND=CL:365414

Change-Id: I18b7282125badbba2c98998d2cff697f1a726ee2
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/366345
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: danny chan <dchan@chromium.org>
1 file changed