+++ /dev/null
-#!/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
-
-command -v cpuset >/dev/null || command -v numactl >/dev/null || command -v taskset >/dev/null || {
- echo_i "This test requires cpuset, numactl, or taskset." >&2
- exit 255
-}
-
-exit 0
import pytest
-pytestmark = pytest.mark.extra_artifacts(
+import isctest.mark
+
+EXTRA_ARTIFACTS = pytest.mark.extra_artifacts(
[
"named.run.*",
"ns1/managed-keys.*",
]
)
+pytestmark = [
+ isctest.mark.with_cpu_affinity,
+ EXTRA_ARTIFACTS,
+]
+
def test_cpu(run_tests_sh):
run_tests_sh()
os.getenv("FEATURE_TSAN") == "1", reason="incompatible with ThreadSanitizer (TSAN)"
)
+with_cpu_affinity = pytest.mark.skipif(
+ not (shutil.which("cpuset") or shutil.which("numactl") or shutil.which("taskset")),
+ reason="cpuset, numactl, or taskset is required",
+)
+
softhsm2_environment = pytest.mark.skipif(
not (
os.getenv("SOFTHSM2_CONF")