Merge pull request #130 from kinvolk/kai/gen-test-update

Generate test update payload and run the kola update test
This commit is contained in:
Kai Lüke 2021-07-14 20:50:15 +02:00 committed by GitHub
commit b55bfa3341
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 27 additions and 0 deletions

View File

@ -62,6 +62,17 @@ extract_update() {
"${BUILD_LIBRARY_DIR}/disk_util" --disk_layout="${disk_layout}" \
extract "${BUILD_DIR}/${image_name}" "USR-A" "${update_path}"
upload_image "${update_path}"
# For production as well as dev builds we generate a dev-key-signed update
# payload for running tests (the signature won't be accepted by production systems).
local update_test="${BUILD_DIR}/flatcar_test_update.gz"
delta_generator \
-private_key "/usr/share/update_engine/update-payload-key.key.pem" \
-new_image "${update_path}" \
-new_kernel "${BUILD_DIR}/${image_name%.bin}.vmlinuz" \
-out_file "${update_test}"
upload_image "${update_test}"
}
zip_update_tools() {

View File

@ -50,6 +50,13 @@ if [[ "${KOLA_TESTS}" == "" ]]; then
KOLA_TESTS="*"
fi
rm -f flatcar_test_update.gz
bin/gangue get \
--json-key="${GOOGLE_APPLICATION_CREDENTIALS}" \
--verify=true $verify_key \
"${DOWNLOAD_ROOT}/boards/${BOARD}/${FLATCAR_VERSION}/flatcar_test_update.gz"
mv flatcar_test_update.gz tmp/
# Do not expand the kola test patterns globs
set -o noglob
enter sudo timeout --signal=SIGQUIT 12h kola run \
@ -61,6 +68,7 @@ enter sudo timeout --signal=SIGQUIT 12h kola run \
--qemu-image=/mnt/host/source/tmp/flatcar_production_image.bin \
--tapfile="/mnt/host/source/${JOB_NAME##*/}.tap" \
--torcx-manifest=/mnt/host/source/torcx_manifest.json \
--update-payload=/mnt/host/source/tmp/flatcar_test_update.gz \
${KOLA_TESTS}
set +o noglob

View File

@ -50,6 +50,13 @@ if [[ "${KOLA_TESTS}" == "" ]]; then
KOLA_TESTS="*"
fi
rm -f flatcar_test_update.gz
bin/gangue get \
--json-key="${GOOGLE_APPLICATION_CREDENTIALS}" \
--verify=true $verify_key \
"${DOWNLOAD_ROOT}/boards/${BOARD}/${FLATCAR_VERSION}/flatcar_test_update.gz"
mv flatcar_test_update.gz tmp/
# Do not expand the kola test patterns globs
set -o noglob
enter sudo timeout --signal=SIGQUIT 14h kola run \
@ -61,6 +68,7 @@ enter sudo timeout --signal=SIGQUIT 14h kola run \
--qemu-image=/mnt/host/source/tmp/flatcar_production_image.bin \
--tapfile="/mnt/host/source/${JOB_NAME##*/}.tap" \
--torcx-manifest=/mnt/host/source/torcx_manifest.json \
--update-payload=/mnt/host/source/tmp/flatcar_test_update.gz \
${KOLA_TESTS}
set +o noglob