From 5baddb2c23affe14c7498d6d19fd4ab98a7f6df7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Bal=C3=A1=C5=BEik?= Date: Tue, 6 Jan 2026 15:12:25 +0100 Subject: [PATCH 1/4] Use git_clone_bind9-qa anchor in .system_test_common This was missed in abecddb13afa3f8ad9611f1241a635fbe6b90818. (cherry picked from commit af809329b3e31aa42851feea4dc0931bd219bd16) --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0d7ad2da1f..c1d9878c64 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -555,7 +555,7 @@ stages: - if pytest --version | grep -F "pytest 9.0" >/dev/null; then echo "filterwarnings = ignore::pytest.PytestRemovedIn9Warning" >> pytest.ini; fi - > ("$PYTEST" --junit-xml="$CI_PROJECT_DIR"/junit.xml -n "$TEST_PARALLEL_JOBS" | tee pytest.out.txt) || RET=1 - - git clone --depth 1 https://gitlab.isc.org/isc-projects/bind9-qa.git + - *git_clone_bind9-qa - > "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit.xml --output "$CI_PROJECT_DIR"/junit.xml - (exit $RET) From 596cdfb75da6c8a894eb5103bb789580f548b03d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Bal=C3=A1=C5=BEik?= Date: Tue, 6 Jan 2026 12:03:04 +0100 Subject: [PATCH 2/4] Don't overwrite JUnit file generated by pytest in post-processing When both input and output files are the same, it creates unnecesary troubles in debugging issues with the JUnit files. Keep the Pytest-generated file in the artifacts and output the checked version as a new file. (cherry picked from commit 1a85a27f54e270060c7dead8e227ad8cec43283a) --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index c1d9878c64..df0a33efd0 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -554,10 +554,10 @@ stages: # This should be fixed before pytest 9.1, when it becomes ineffective. - if pytest --version | grep -F "pytest 9.0" >/dev/null; then echo "filterwarnings = ignore::pytest.PytestRemovedIn9Warning" >> pytest.ini; fi - > - ("$PYTEST" --junit-xml="$CI_PROJECT_DIR"/junit.xml -n "$TEST_PARALLEL_JOBS" | tee pytest.out.txt) || RET=1 + ("$PYTEST" --junit-xml="$CI_PROJECT_DIR"/junit_pytest.xml -n "$TEST_PARALLEL_JOBS" | tee pytest.out.txt) || RET=1 - *git_clone_bind9-qa - > - "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit.xml --output "$CI_PROJECT_DIR"/junit.xml + "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_pytest.xml --output "$CI_PROJECT_DIR"/junit.xml - (exit $RET) - '( ! grep -F "grep: warning:" pytest.out.txt )' - test "$CLEAN_BUILD_ARTIFACTS_ON_SUCCESS" -eq 0 || ( cd ../../.. && make clean >/dev/null 2>&1 ) @@ -976,10 +976,10 @@ cross-version-config-tests: # 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}" || RET=1 + "$PYTEST" --setup-only --junit-xml="$CI_PROJECT_DIR"/junit_pytest.xml -n "${TEST_PARALLEL_JOBS:-1}" || RET=1 - *git_clone_bind9-qa - > - "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit.xml --output "$CI_PROJECT_DIR"/junit.xml + "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_pytest.xml --output "$CI_PROJECT_DIR"/junit.xml - (exit $RET) needs: - job: autoreconf From 26d45d655de9905630f35c02c830c473cc6c7ea9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Bal=C3=A1=C5=BEik?= Date: Tue, 6 Jan 2026 16:42:34 +0100 Subject: [PATCH 3/4] Generate, check the JUnit reports for the doctest job Pass it to GitLab for display. (cherry picked from commit 0f2d0daabc47eaa5fbde2ceb0b30c35df9f9e255) --- .gitlab-ci.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index df0a33efd0..3671649270 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -781,16 +781,32 @@ coccinelle: doctest: <<: *precheck_job + # 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 + - *find_python - *find_pytest - export TOP_BUILDDIR=$(cat bin/tests/system/isctest/vars/.ac_vars/TOP_BUILDDIR) - cd bin/tests/system/isctest + - RET=0 - > - "$PYTEST" --noconftest --doctest-modules + "$PYTEST" --noconftest --doctest-modules --junit-xml="$CI_PROJECT_DIR/junit_doctest.xml" || RET=1 + - *git_clone_bind9-qa + - > + "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR/junit_doctest.xml" --output "$CI_PROJECT_DIR/junit.xml" + - (exit $RET) needs: - job: autoreconf artifacts: true + artifacts: + reports: + junit: + - junit.xml pylint: <<: *precheck_job From 0609e48adb3bed9bb0f6559ad334bbeb7e6fd663 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=A0t=C4=9Bp=C3=A1n=20Bal=C3=A1=C5=BEik?= Date: Wed, 7 Jan 2026 18:35:56 +0100 Subject: [PATCH 4/4] Don't overwrite JUnit files generated by the convert-trs-to-junit.py It makes debugging easier. --- .gitlab-ci.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 3671649270..26c199f440 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -591,10 +591,10 @@ stages: - cd "$CI_PROJECT_DIR" - *find_python - > - "$PYTHON" bin/tests/convert-trs-to-junit.py . > "$CI_PROJECT_DIR"/junit.xml + "$PYTHON" bin/tests/convert-trs-to-junit.py . > "$CI_PROJECT_DIR"/junit_system.xml - *git_clone_bind9-qa - > - "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit.xml --output "$CI_PROJECT_DIR"/junit.xml + "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_system.xml --output "$CI_PROJECT_DIR"/junit.xml - (exit $RET) after_script: - cat bin/tests/system/test-suite.log || true @@ -623,9 +623,9 @@ stages: - *find_python - *git_clone_bind9-qa - > - "$PYTHON" "$CI_PROJECT_DIR"/bin/tests/convert-trs-to-junit.py . > "$CI_PROJECT_DIR"/junit.xml + "$PYTHON" "$CI_PROJECT_DIR"/bin/tests/convert-trs-to-junit.py . > "$CI_PROJECT_DIR"/junit_unit.xml - > - "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit.xml --output "$CI_PROJECT_DIR"/junit.xml + "$PYTHON" bind9-qa/ci/postprocess_junit_files.py "$CI_PROJECT_DIR"/junit_unit.xml --output "$CI_PROJECT_DIR"/junit.xml - (exit $RET) - test "$CLEAN_BUILD_ARTIFACTS_ON_SUCCESS" -eq 0 || make clean >/dev/null 2>&1 artifacts: