]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
Use Pytest mark to guard dnstap features
authorPetr Špaček <pspacek@isc.org>
Fri, 23 May 2025 15:37:19 +0000 (17:37 +0200)
committerPetr Špaček <pspacek@isc.org>
Wed, 28 May 2025 10:45:32 +0000 (10:45 +0000)
bin/tests/system/dnstap/prereq.sh [deleted file]
bin/tests/system/dnstap/tests_dnstap.py
bin/tests/system/dnstap/tests_sh_dnstap.py

diff --git a/bin/tests/system/dnstap/prereq.sh b/bin/tests/system/dnstap/prereq.sh
deleted file mode 100644 (file)
index 747f448..0000000
+++ /dev/null
@@ -1,20 +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
-
-$FEATURETEST --enable-dnstap || {
-  echo_i "This test requires dnstap support." >&2
-  exit 255
-}
-exit 0
index a5ff505c0f7779be0d4afb321ac09cfb44906ac3..258d2b5f892672c771a92f20445af47751cf0d2e 100644 (file)
@@ -15,19 +15,23 @@ import os
 import re
 
 import isctest
+import isctest.mark
 import pytest
 
 import dns.message
 
 pytest.importorskip("dns", minversion="2.0.0")
 
-pytestmark = pytest.mark.extra_artifacts(
-    [
-        "dnstap.out.*",
-        "ns*/dnstap.out*",
-        "ns2/example.db",
-    ]
-)
+pytestmark = [
+    isctest.mark.with_dnstap,
+    pytest.mark.extra_artifacts(
+        [
+            "dnstap.out.*",
+            "ns*/dnstap.out*",
+            "ns2/example.db",
+        ]
+    ),
+]
 
 
 def run_rndc(server, rndc_command):
index 5d4d7a9e9e96fab7795e6f5ede20e2f567316dcd..10d9a4111b20b7d7475776aa9324d6da5a1a2bbb 100644 (file)
 
 import pytest
 
-pytestmark = pytest.mark.extra_artifacts(
-    [
-        "dig.out*",
-        "dnstap.hex*",
-        "dnstap.out*",
-        "fstrm_capture.out.*",
-        "nsupdate.out*",
-        "ydump.out*",
-        "ns*/dnstap.out*",
-        "ns2/example.db",
-        "ns2/example.db.jnl",
-    ]
-)
+import isctest.mark
+
+pytestmark = [
+    isctest.mark.with_dnstap,
+    pytest.mark.extra_artifacts(
+        [
+            "dig.out*",
+            "dnstap.hex*",
+            "dnstap.out*",
+            "fstrm_capture.out.*",
+            "nsupdate.out*",
+            "ydump.out*",
+            "ns*/dnstap.out*",
+            "ns2/example.db",
+            "ns2/example.db.jnl",
+        ]
+    ),
+]
 
 
 def test_dnstap(run_tests_sh):