From 0f2d0daabc47eaa5fbde2ceb0b30c35df9f9e255 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C5=A0t=C4=9Bp=C3=A1n=20Bal=C3=A1=C5=BEik?= Date: Tue, 6 Jan 2026 16:42:34 +0100 Subject: [PATCH] Generate, check the JUnit reports for the doctest job Pass it to GitLab for display. --- .gitlab-ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d866b72294a..5a6ac3dc69e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -771,13 +771,29 @@ meson-format: doctest: <<: *precheck_job needs: [] + # This script needs to: 1) fail if the doctest fails, 2) fail if + # the junit.xml file is broken, 3) produce the junit.xml file even if + # the doctest fails. Therefore, $RET is used to "cache" the + # result of running pytest as interrupting the script immediately when + # a doctest fails would make checking the contents of the junit.xml + # file impossible (GitLab Runner uses "set -o pipefail"). script: - *configure - meson compile -C build system-test-init + - *find_python - *find_pytest - cd bin/tests/system/isctest + - RET=0 + - > + "$PYTEST" --noconftest --doctest-modules --junit-xml="$CI_PROJECT_DIR/junit_doctest.xml" || RET=1 + - *git_clone_bind9-qa - > - "$PYTEST" --noconftest --doctest-modules + "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR/junit_doctest.xml" --output "$CI_PROJECT_DIR/junit.xml" + - (exit $RET) + artifacts: + reports: + junit: + - junit.xml pylint: <<: *precheck_job -- 2.47.3