]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Move the statschannel prereq.sh check to a marker
authorNicki Křížek <nicki@isc.org>
Wed, 1 Jul 2026 13:40:07 +0000 (13:40 +0000)
committerNicki Křížek <nicki@isc.org>
Fri, 10 Jul 2026 11:17:41 +0000 (13:17 +0200)
The libxml2/json-c requirement becomes with_libxml2_or_json_c. The
stale Net::DNS check and the core-Perl File::Fetch check are dropped
rather than carried over.

Assisted-by: Claude:claude-opus-4-8
bin/tests/system/isctest/mark.py
bin/tests/system/statschannel/prereq.sh [deleted file]
bin/tests/system/statschannel/tests_sh_statschannel.py

index 5debabb2bf6e714a2168078a15daa897f4edeee7..5b62697f1fedd88c4ccf018ca22b103bff696a15 100644 (file)
@@ -127,6 +127,11 @@ with_gssapi = pytest.mark.skipif(
     os.getenv("FEATURE_GSSAPI") != "1", reason="GSS-API support disabled in the build"
 )
 
+with_libxml2_or_json_c = pytest.mark.skipif(
+    os.getenv("FEATURE_LIBXML2") != "1" and os.getenv("FEATURE_JSON_C") != "1",
+    reason="libxml2 or json-c support is required",
+)
+
 with_fips_dh = pytest.mark.skipif(
     os.getenv("FEATURE_FIPS_DH") != "1", reason="FIPS mode Diffie-Hellman is required"
 )
diff --git a/bin/tests/system/statschannel/prereq.sh b/bin/tests/system/statschannel/prereq.sh
deleted file mode 100644 (file)
index df30423..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/sh
-
-# Copyright (C) Internet Systems Consortium, Inc. ("ISC")
-#
-# SPDX-License-Identifier: MPL-2.0
-#
-# This Source Code Form is subject to the terms of the Mozilla Public
-# License, v. 2.0.  If a copy of the MPL was not distributed with this
-# file, you can obtain one at https://mozilla.org/MPL/2.0/.
-#
-# See the COPYRIGHT file distributed with this work for additional
-# information regarding copyright ownership.
-
-. ../conf.sh
-
-if ! ${PERL} -MNet::DNS -e ''; then
-  echo_i "perl Net::DNS module is required"
-  exit 1
-fi
-
-if ! ${PERL} -MFile::Fetch -e ''; then
-  echo_i "perl File::Fetch module is required"
-  exit 1
-fi
-
-if ! $FEATURETEST --have-libxml2 && ! $FEATURETEST --have-json-c; then
-  echo_i "skip: one or both of --with-libxml2 and --with-json-c required"
-  exit 255
-fi
-
-exit 0
index 473646cf1b3551e98e1e2e5acb0f5e5aaf26e2e0..b35427a64c4aad3c67e3723f3da22b7845ac73a7 100644 (file)
@@ -11,7 +11,9 @@
 
 import pytest
 
-pytestmark = pytest.mark.extra_artifacts(
+import isctest.mark
+
+EXTRA_ARTIFACTS = pytest.mark.extra_artifacts(
     [
         "K*",
         "ans5/ans.run",
@@ -51,6 +53,11 @@ pytestmark = pytest.mark.extra_artifacts(
     ]
 )
 
+pytestmark = [
+    isctest.mark.with_libxml2_or_json_c,
+    EXTRA_ARTIFACTS,
+]
+
 
 def test_statschannel(run_tests_sh):
     run_tests_sh()