]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check the validity of cross-version-config-test's XML output
authorŠtěpán Balážik <stepan@isc.org>
Wed, 15 Oct 2025 16:33:18 +0000 (18:33 +0200)
committerŠtěpán Balážik <stepan@isc.org>
Fri, 19 Dec 2025 18:26:22 +0000 (18:26 +0000)
This was overlooked before.

.gitlab-ci.yml

index cd8fd309bf848dbd6bf5dda4978b0615128e7ce7..8687380270755f31f21d70bfbd826a71aa4726a7 100644 (file)
@@ -939,8 +939,17 @@ cross-version-config-tests:
     # should not be run.
     - rm -r dlzexternal
     - rm -r dyndb
+    # This script needs to: 1) fail if the tests fail, 2) fail if
+    # the junit.xml file is broken, 3) produce the junit.xml file even if
+    # the  tests fail.  Therefore, $RET is used to "cache" the
+    # result of running pytest as interrupting the script immediately when
+    # system tests fail would make checking the contents of the junit.xml
+    # file impossible (GitLab Runner uses "set -o pipefail").
+    - RET=0
     - >
-      "$PYTEST" --setup-only --junit-xml="$CI_PROJECT_DIR"/junit.xml -n "${TEST_PARALLEL_JOBS:-1}"
+      "$PYTEST" --setup-only --junit-xml="$CI_PROJECT_DIR"/junit.xml -n "${TEST_PARALLEL_JOBS:-1}" || RET=1
+    - *check_for_junit_xml
+    - (exit $RET)
   needs:
     - job: ci-variables
       artifacts: true