From 58ff3b4fc08d15cafe3345d5edf84aef3c7b8e16 Mon Sep 17 00:00:00 2001 From: Tom Krizek Date: Tue, 17 Jan 2023 14:18:22 +0100 Subject: [PATCH] Fix feature detection for pytest markers in tests 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. (cherry picked from commit 473cb530f4280547c320405c23464debc2fe141a) --- bin/tests/system/pytest_custom_markers.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/tests/system/pytest_custom_markers.py b/bin/tests/system/pytest_custom_markers.py index 9714c0fbf5..7411afeafd 100644 --- a/bin/tests/system/pytest_custom_markers.py +++ b/bin/tests/system/pytest_custom_markers.py @@ -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" )