Browse Source

[scripts/test] Refactor convert_and_test and support multiple extra_args

Changelog: None

Signed-off-by: Lluis Campos <lluis.campos@northern.tech>
2.3.x
Lluis Campos 4 years ago
parent
commit
e3ad5a2b1f
  1. 19
      scripts/test/test-utils.sh

19
scripts/test/test-utils.sh

@ -61,11 +61,10 @@ convert_and_test() {
device_type=$1
artifact_name=$2
image_file=$3
extra_args=$4 # Optional
shift 3
extra_args=$@ # Optional
MENDER_ARTIFACT_NAME=${artifact_name} ./docker-mender-convert \
--disk-image ${image_file} \
${extra_args}
run_convert ${artifact_name} ${image_file} ${extra_args}
local compression="${image_file##*.}"
local ret=0
@ -82,6 +81,18 @@ convert_and_test() {
}
run_convert() {
artifact_name=$1
image_file=$2
shift 2
extra_args=$@ # Optional
MENDER_ARTIFACT_NAME=${artifact_name} ./docker-mender-convert \
--disk-image ${image_file} \
${extra_args}
}
run_tests() {
device_type=$1
converted_image_file=$2

Loading…
Cancel
Save