futility: cmd_update: Add '--emulate' option

To help debugging and testing, we may want to run updater against an
image file instead of modifying real system firmware.

The --emulate allows running with all checks and reading, and outputs
to given file.

BUG=chromium:875551
TEST=make futil; futility update -i IMAGE --emulate IMAGE2
     tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None

Change-Id: Ic52fe60a1468f29245cade70f859513d8d117c9c
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1184953
Reviewed-by: Randall Spangler <rspangler@chromium.org>
2 files changed