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.

TEST=`dut-control power_state:off && dut-control power_state:rec` for
ultima and cyan.  Verified that DUT boots into recovery mode.


Change-Id: I18b7282125badbba2c98998d2cff697f1a726ee2
Signed-off-by: Aseda Aboagye <>
Commit-Ready: Aseda Aboagye <>
Tested-by: Aseda Aboagye <>
Reviewed-by: danny chan <>
1 file changed