From ba83abd3255106cbbcbd40d791a43bb3a73a150e Mon Sep 17 00:00:00 2001 From: Lluis Campos Date: Wed, 2 Oct 2019 10:13:08 +0200 Subject: [PATCH] Continue executing tests regardless of previous failures The final exit code will represent if any of the cases have failed. Changelog: None Signed-off-by: Lluis Campos --- scripts/run-tests.sh | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 65b3f48..3179055 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -89,8 +89,11 @@ convert_and_test() { --board-type="${device_type}" \ --mender-image=${device_type}-${artifact_name}.sdimg \ --sdimg-location="${MENDER_CONVERT_DIR}/deploy" + exitcode=$? cd - + + return $exitcode } get_pytest_files() { @@ -112,29 +115,32 @@ mkdir -p ${WORKSPACE} get_pytest_files +test_result=0 + convert_and_test "qemux86_64" \ "release-1" \ "${UBUNTU_IMAGE_URL}" \ "${UBUNTU_IMAGE}" \ "${UBUNTU_IMAGE}.gz" \ - "configs/qemux86-64_config" - + "configs/qemux86-64_config" || test_result=$? convert_and_test "raspberrypi" \ "release-1" \ "${RASPBIAN_IMAGE_URL}" \ "${RASPBIAN_IMAGE}.img" \ "${RASPBIAN_IMAGE}.zip" \ - "configs/raspberrypi3_config" + "configs/raspberrypi3_config" || test_result=$? convert_and_test "linaro-alip" \ "release-1" \ "${TINKER_IMAGE_URL}" \ "${TINKER_IMAGE}.img" \ - "${TINKER_IMAGE}.zip" + "${TINKER_IMAGE}.zip" || test_result=$? convert_and_test "beaglebone" \ "release-1" \ "${BBB_DEBIAN_IMAGE_URL}" \ "${BBB_DEBIAN_IMAGE}" \ - "${BBB_DEBIAN_IMAGE}.xz" + "${BBB_DEBIAN_IMAGE}.xz" || test_result=$? + +exit $test_result