summaryrefslogtreecommitdiff
path: root/tests/futility
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-09-19 14:27:30 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-09-19 08:59:51 -0700
commit580beb881061700e5f75fc21b544483b2e258952 (patch)
tree7cf621c51dbf204a125cc1eb9c96698421daf532 /tests/futility
parent0828bde7b1f0e932c2db0884cb6894c422672666 (diff)
downloadvboot-580beb881061700e5f75fc21b544483b2e258952.tar.gz
futility: update: Add legacy option '--factory'
The '--factory' is an alias to '--mode=factory_install' and was widely used in several documents. Also moved WP check to end of argument parsing so '--mode=factory --wp=0' can set WP correctly. BRANCH=None BUG=b:115764295 TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility Change-Id: I7987d77c577414efb03941442e3125f35ac5ad98 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1233373 Reviewed-by: Joel Kitching <kitching@chromium.org>
Diffstat (limited to 'tests/futility')
-rwxr-xr-xtests/futility/test_update.sh12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh
index 119974f1..b74c7ea9 100755
--- a/tests/futility/test_update.sh
+++ b/tests/futility/test_update.sh
@@ -223,11 +223,19 @@ test_update "RW update (vboot1, B->B)" \
# Test 'factory mode'
test_update "Factory mode update (WP=0)" \
"${FROM_IMAGE}" "${TMP}.expected.full" \
- -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1
+ -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1 --mode=factory
+
+test_update "Factory mode update (WP=0)" \
+ "${FROM_IMAGE}" "${TMP}.expected.full" \
+ --factory -i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1
test_update "Factory mode update (WP=1)" \
"${FROM_IMAGE}" "!needs WP disabled" \
- -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001,1
+ -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001,1 --mode=factory
+
+test_update "Factory mode update (WP=1)" \
+ "${FROM_IMAGE}" "!needs WP disabled" \
+ --factory -i "${TO_IMAGE}" --wp=1 --sys_props 0,0x10001,1
# Test legacy update
test_update "Legacy update" \