Browse Source

Make MENDER_COMPRESS_DISK_IMAGE have same args as MENDER_ARTIFACT_COMPRESSION

Changelog: None

Signed-off-by: Kristian Amlie <kristian.amlie@northern.tech>
2.0.x
Kristian Amlie 5 years ago
parent
commit
901e40944f
No known key found for this signature in database GPG Key ID: F464407C996AF03F
  1. 3
      configs/mender_convert_config
  2. 4
      mender-convert-package
  3. 6
      scripts/test/test-utils.sh

3
configs/mender_convert_config

@ -11,10 +11,9 @@
# machine, and obviously saves space.
#
# Possible values are:
# 'n' - No compression
# 'none' - No compression
# 'gzip' - Compress with gzip
# 'lzma' - Compress with xz (LZMA)
# 'y' - Alias for 'gzip'
MENDER_COMPRESS_DISK_IMAGE=gzip
# Compression algorithm for Mender Artifact

4
mender-convert-package

@ -252,7 +252,7 @@ if [ "${MENDER_USE_BMAP}" == "y" ]; then
fi
case "${MENDER_COMPRESS_DISK_IMAGE}" in
y | gzip)
gzip)
log_info "Compressing ${sdimg_path}.gz"
run_and_log_cmd "pigz --best --force ${sdimg_path}"
;;
@ -260,7 +260,7 @@ case "${MENDER_COMPRESS_DISK_IMAGE}" in
log_info "Compressing ${sdimg_path}.xz"
run_and_log_cmd "pxz --best --force ${sdimg_path}"
;;
n)
none)
:
;;
*)

6
scripts/test/test-utils.sh

@ -43,12 +43,12 @@ convert_and_test() {
# - test providing multiple '--config' options
#
# - (when no platform configuration is provided) test conversion without
# '--config' and with MENDER_COMPRESS_DISK_IMAGE=y. Compressed disk
# '--config' and with MENDER_COMPRESS_DISK_IMAGE=gzip. Compressed disk
# images is the default user facing option and we need to ensure that we
# cover this in the tests.
if [ -n "${config}" ]; then
echo "Will disable MENDER_COMPRESS_DISK_IMAGE for this image"
echo "MENDER_COMPRESS_DISK_IMAGE=n" > ${WORKSPACE}/test_config
echo "MENDER_COMPRESS_DISK_IMAGE=none" > ${WORKSPACE}/test_config
local MENDER_CONVERT_EXTRA_ARGS="--config ${config} --config ${WORKSPACE}/test_config"
fi
@ -74,7 +74,7 @@ run_tests() {
html_report_args="--html=${MENDER_CONVERT_DIR}/report_${device_type}.html --self-contained-html"
fi
# Need to decompress images built with MENDER_COMPRESS_DISK_IMAGE=y before
# Need to decompress images built with MENDER_COMPRESS_DISK_IMAGE=gzip before
# running tests.
if [ -f deploy/${device_type}-${artifact_name}.sdimg.gz ]; then
# sudo is needed because the image is created using docker-mender-convert

Loading…
Cancel
Save