]> 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>
Wed, 7 Jan 2026 16:20:02 +0000 (17:20 +0100)
This was overlooked before.

(cherry picked from commit 5528ed7a5b1d3f3246ea43e35f4dfabe68ed7d5a)

.gitlab-ci.yml

index 6e52cc596553cd5d09aaa637c5321b19b1a52327..ac3e755183f96a4ec3372d728b3c337bb76cfb1e 100644 (file)
@@ -976,8 +976,17 @@ cross-version-config-tests:
     # release using the binaries built for the current BIND 9 version.  This
     # intends to detect obvious backward compatibility issues with the latter.
     - sed -i "s|f\"{AC_VARS\['TOP_BUILDDIR'\]}|\"$CI_PROJECT_DIR|g" isctest/vars/basic.py
+    # 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: autoreconf
       artifacts: true