summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorHung-Te Lin <hungte@chromium.org>2018-10-06 03:15:19 +0800
committerchrome-bot <chrome-bot@chromium.org>2018-10-13 21:59:21 -0700
commit3e6397d3d612a6436052c163b8686020357e7442 (patch)
tree9ac5583599f3d7963afb305ac13d9b68278f3e4f /tests
parent7c94d5be063a5950b8af558739b7c351eddd3ced (diff)
downloadvboot-3e6397d3d612a6436052c163b8686020357e7442.tar.gz
futility: updater: Add --manifest to scan and print archive info
The firmware updater packages used to rely on a pre-generated VERSION file to report what files were included and their image versions. Its format was hard to parse, and may be out-dated if people repack without updating VERSION file. The firmware updater today has the ability to read and parse version, key hash, ... etc everything we need, so it seems more reasonable to just let firmware updater scan updater package and print the information in JSON format, so it will be very easy to fetch latest information. To make sure the output is purely JSON, the start and end messages are now sent to stderr instead of stdout. BUG=chromium:875551 TEST=TEST=make futil; tests/futility/run_test_scripts.sh $(pwd)/build/futility BRANCH=None Change-Id: Ifa468fbb3adf798c7931f015258e6c6ce93de993 Signed-off-by: Hung-Te Lin <hungte@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1260804
Diffstat (limited to 'tests')
-rw-r--r--tests/futility/link.manifest.json6
-rwxr-xr-xtests/futility/test_update.sh4
2 files changed, 10 insertions, 0 deletions
diff --git a/tests/futility/link.manifest.json b/tests/futility/link.manifest.json
new file mode 100644
index 00000000..2cd5281b
--- /dev/null
+++ b/tests/futility/link.manifest.json
@@ -0,0 +1,6 @@
+{
+ "default": {
+ "host": { "versions": { "ro": "Google_Link.2695.1.133", "rw": "Google_Link.2695.1.133" },
+ "image": "bios.bin" }
+ }
+}
diff --git a/tests/futility/test_update.sh b/tests/futility/test_update.sh
index cd1bcb61..c7880486 100755
--- a/tests/futility/test_update.sh
+++ b/tests/futility/test_update.sh
@@ -283,11 +283,15 @@ test_update "Full update (--quirks min_platform_version)" \
-i "${TO_IMAGE}" --wp=0 --sys_props 0,0x10001,1,3
mkdir -p "${TMP}.archive"
+cp -f "${LINK_BIOS}" "${TMP}.archive/bios.bin"
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
+echo "TEST: Manifest (--manifest)"
+${FUTILITY} update -a "${TMP}.archive" --manifest >"${TMP}.json.out"
+cmp "${TMP}.json.out" "${SCRIPTDIR}/link.manifest.json"
# Test special programmer
if type flashrom >/dev/null 2>&1; then