From: Nicki Křížek Date: Mon, 16 Jun 2025 13:51:51 +0000 (+0200) Subject: Turn on doctest in CI X-Git-Tag: v9.21.11~40^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d737986ea24bdcb344a91a491816766b80120c15;p=thirdparty%2Fbind9.git Turn on doctest in CI Run doctests for the isctest module in a dedicated CI job. --- diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 41768897a09..761abb77470 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -599,6 +599,17 @@ coccinelle: - util/check-cocci - if test "$(git status --porcelain | grep -Ev '\?\?' | wc -l)" -gt "0"; then git status --short; exit 1; fi +doctest: + <<: *precheck_job + needs: [] + script: + - *configure + - meson compile -C build system-test-init + - *find_pytest + - cd bin/tests/system/isctest + - > + "$PYTEST" --noconftest --doctest-modules + pylint: <<: *default_triggering_rules <<: *debian_sid_amd64_image diff --git a/bin/tests/system/isctest/mark.py b/bin/tests/system/isctest/mark.py index 7fdb964dc69..0961d9bb141 100644 --- a/bin/tests/system/isctest/mark.py +++ b/bin/tests/system/isctest/mark.py @@ -30,7 +30,9 @@ live_internet_test = pytest.mark.skipif( def feature_test(feature): - feature_test_bin = os.environ["FEATURETEST"] + feature_test_bin = os.environ.get("FEATURETEST") + if not feature_test_bin: # this can be the case when running doctest + return False try: subprocess.run([feature_test_bin, feature], check=True) except subprocess.CalledProcessError as exc: