]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Turn on doctest in CI
authorNicki Křížek <nicki@isc.org>
Mon, 16 Jun 2025 13:51:51 +0000 (15:51 +0200)
committerNicki Křížek <nicki@isc.org>
Fri, 18 Jul 2025 09:32:41 +0000 (11:32 +0200)
Run doctests for the isctest module in a dedicated CI job.

.gitlab-ci.yml
bin/tests/system/isctest/mark.py

index 41768897a090b54c344b5637be50937a84c9f915..761abb774704e1e85bd70cf1d140d25ac5f4e4b8 100644 (file)
@@ -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
index 7fdb964dc69f72fc8fab595bce67509618ff3321..0961d9bb141bc31dfec295f01555af97e3f00c47 100644 (file)
@@ -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: