diff options
author | Hung-Te Lin <hungte@chromium.org> | 2018-08-31 14:47:35 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-09-10 01:13:19 -0700 |
commit | c6c620194ff4a44626b550338973df7aa00886f7 (patch) | |
tree | b5581d74934d3671194137595dcec1fd81e7781d /tests/futility/test_update.sh | |
parent | f917d4d2324a9316603f50e8311639a6093180a3 (diff) | |
download | vboot-c6c620194ff4a44626b550338973df7aa00886f7.tar.gz |
futility: cmd_update: Add --quirks for device-specific hacks
The firmware updater usually needs to apply many special rules for particular
device, previously done by the 'updater_custom.sh' script.
In futility updater, we want to support that by a 'quirks' system, that
the updater package can declare a list of needed quirks and send to updater
as `futility update --quirks LIST`.
Currently only a dummy "test" quirks is defined.
The real quirks will be added in follow up changes.
BUG=chromium:875551
TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility
BRANCH=None
Change-Id: Ic935d69a54473f2347964e7c161ffcdc0af43ec6
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/1198804
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests/futility/test_update.sh')
-rwxr-xr-x | tests/futility/test_update.sh | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh index 0f3fafc7..8cba724b 100755 --- a/tests/futility/test_update.sh +++ b/tests/futility/test_update.sh @@ -19,6 +19,16 @@ test "$(test_sys_props "1, 2,3 ")" = "0,1, 1,2, 2,3, " test "$(test_sys_props " 1,, 2")" = "0,1, 2,2, " test "$(test_sys_props " , 4,")" = "1,4, " +test_quirks() { + ! "${FUTILITY}" --debug update --quirks "$*" | + sed -n 's/.*Set quirk \(.*\) to \(.*\)./\1,\2/p' | + tr '\n' ' ' +} + +test "$(test_quirks "test")" = "test,1 " +test "$(test_quirks "test=2")" = "test,2 " +test "$(test_quirks " test, test=2")" = "test,1 test,2 " + # Test data files LINK_BIOS="${SCRIPTDIR}/data/bios_link_mp.bin" PEPPY_BIOS="${SCRIPTDIR}/data/bios_peppy_mp.bin" |