]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Check for FEATURETEST before running pytest
authorNicki Křížek <nicki@isc.org>
Tue, 8 Jul 2025 14:14:15 +0000 (16:14 +0200)
committerNicki Křížek <nicki@isc.org>
Thu, 10 Jul 2025 15:13:05 +0000 (17:13 +0200)
When compiling with meson, it may be easy to forget to compile system
test dependencies before running the tests. In that case, the test
results would be quite incosistent and unpredictable, with some tests
ending up with ERROR, some with FAILURE and others PASS, without a clear
indication that something is off before running the entire machinery.

Add a check to fail early on if the FEATURETEST binary isn't available,
indicating that system test dependencies were most likely not compiled.

bin/tests/system/conftest.py

index d23a4571fca0875fb5c23d2c3bc0d8951945a554..6dfc9bed38b1e7ad502e346f2e33e6812e2c4ec6 100644 (file)
@@ -70,6 +70,10 @@ SYMLINK_REPLACEMENT_RE = re.compile(r"/tests(_.*)\.py")
 
 isctest.check.is_executable(isctest.vars.ALL["PYTHON"], "Python interpreter required")
 isctest.check.is_executable(isctest.vars.ALL["PERL"], "Perl interpreter required")
+isctest.check.is_executable(
+    isctest.vars.ALL["FEATURETEST"],
+    "Run this first: ninja -C build system-test-dependencies",
+)
 
 # --------------------------- pytest hooks -------------------------------