]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Fix feature detection for pytest markers in tests
authorTom Krizek <tkrizek@isc.org>
Tue, 17 Jan 2023 13:18:22 +0000 (14:18 +0100)
committerTom Krizek <tkrizek@isc.org>
Tue, 17 Jan 2023 13:18:22 +0000 (14:18 +0100)
The condition was accidentally reversed during refactoring in
9730ac4c5691c36d58c06deec1762a4831b268c5 . It would result in skipped
tests on builds with proper support and false negatives on builds
without proper feature support.

Credit for reporting the issue and the fix goes to Stanislav Levin.

bin/tests/system/pytest_custom_markers.py

index 9714c0fbf5ae1f206c7138b19d621fdba039fc6c..7411afeafd2692186ede42f632a6ed4f39671605 100644 (file)
@@ -34,9 +34,9 @@ def feature_test(feature):
 
 
 have_libxml2 = pytest.mark.skipif(
-    feature_test("--have-libxml2"), reason="libxml2 support disabled in the build"
+    not feature_test("--have-libxml2"), reason="libxml2 support disabled in the build"
 )
 
 have_json_c = pytest.mark.skipif(
-    feature_test("--have-json-c"), reason="json-c support disabled in the build"
+    not feature_test("--have-json-c"), reason="json-c support disabled in the build"
 )