summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-10-01 17:03:42 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-13 11:42:13 -0700
commit7db7a6db8f0719fe0fda8219c7111c7caf0b4546 (patch)
treeb0492521037e1082220794315d12f9089c201cfa /tests
parent66381ae51d7da4a385b5898473d3ccaa8ee20c11 (diff)
downloadvboot-7db7a6db8f0719fe0fda8219c7111c7caf0b4546.tar.gz
futility: updater: Add '--archive' to read from an archive or directory
A firmware update is usually released as a package with multiple images, instructions, signed vblocks and other files. To work with that, a new argument '--archive' is added. The --archive accepts a directory or file, and will determine the correct driver automatically. For resources (for example --image) in relative path, updater should find files from archive. Note in current implementation, only ZIP is supported for file type drivers (and need the system to have libzip already installed). BUG=chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: I6a91cbe73fb4ee203c5fa4607f6651a39ba854d5 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1253229 Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'tests')
-rwxr-xr-xtests/futility/test_update.sh7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh
index b7f0e738..cd1bcb61 100755
--- a/tests/futility/test_update.sh
+++ b/tests/futility/test_update.sh
@@ -282,6 +282,13 @@ test_update "Full update (--quirks min_platform_version)" \
--quirks min_platform_version=3 \
-i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1,3
+mkdir -p "${TMP}.archive"
+cp -f "${TO_IMAGE}" "${TMP}.archive/image_in_archive"
+test_update "Full update (--archive)" \
+ "${FROM_IMAGE}" "${TMP}.expected.full" \
+ -a "${TMP}.archive" \
+ -i "image_in_archive" --wp=0 --sys_props 0,0x10001,1,3
+
# Test special programmer
if type flashrom >/dev/null 2>&1; then
echo "TEST: Full update (dummy programmer)"