util: ec3po: Implement auto interrogation mode.
This commits adds support for the auto interrogation mode. The auto
mode continually scans across the console output looking for a string
that is printed upon reboot. The string is:
Console is enabled; type HELP for help
When the EC-3PO interactive console sees this string, it knows that the
current EC image is not enhanced and therefore no longer needs to
perform an interrogation after every command. Additionally, the
enhanced EC images will print a slightly different string than from
above so that the console can detect enhanced EC images as well.
By default, the console interpreter will now start up in the 'auto' mode
instead of the 'always' mode that it used to. This removes the 300ms
delay after each console command.
BUG=chromium:588611
BRANCH=None
TEST=./util/ec3po/run_tests.sh
TEST=cros lint --debug util/ec3po/console.py
TEST=cros lint --debug util/ec3po/console_unittest.py
Change-Id: Iec7ebd437ee363c2fc01b8b1adade485a0bff7a9
Signed-off-by: Aseda Aboagye <aaboagye@google.com>
Reviewed-on: https://chromium-review.googlesource.com/329054
Commit-Ready: Aseda Aboagye <aaboagye@chromium.org>
Tested-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2 files changed