diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index fd5db23..a6ab48f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -55,3 +55,5 @@ test_acceptance: paths: - results_*.xml - report_*.html + reports: + junit: results_*.xml diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index e8deaad..0d90590 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -99,6 +99,10 @@ convert_and_test() { cd ${WORKSPACE}/mender-image-tests + # This is a trick to make pytest generate different junit reports + # for different runs: renaming the tests folder to tests_ + cp -r tests tests_${device_type} + python3 -m pytest --verbose \ --junit-xml="${MENDER_CONVERT_DIR}/results_${device_type}.xml" \ ${html_report_args} \ @@ -106,7 +110,8 @@ convert_and_test() { --test-variables="${MENDER_CONVERT_DIR}/deploy/${device_type}-${artifact_name}.cfg" \ --board-type="${device_type}" \ --mender-image=${device_type}-${artifact_name}.sdimg \ - --sdimg-location="${MENDER_CONVERT_DIR}/deploy" + --sdimg-location="${MENDER_CONVERT_DIR}/deploy" \ + tests_${device_type} exitcode=$? cd -