diff --git a/bin/tests/system/geoip2/prereq.sh b/bin/tests/system/geoip2/prereq.sh deleted file mode 100644 index 942888ebcf..0000000000 --- a/bin/tests/system/geoip2/prereq.sh +++ /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 --have-geoip2 || { - echo_i "This test requires GeoIP support." >&2 - exit 255 -} -exit 0 diff --git a/bin/tests/system/geoip2/tests_sh_geoip2.py b/bin/tests/system/geoip2/tests_sh_geoip2.py index e0dc60bd01..84d85158bd 100644 --- a/bin/tests/system/geoip2/tests_sh_geoip2.py +++ b/bin/tests/system/geoip2/tests_sh_geoip2.py @@ -11,7 +11,9 @@ import pytest -pytestmark = pytest.mark.extra_artifacts( +import isctest.mark + +EXTRA_ARTIFACTS = pytest.mark.extra_artifacts( [ "dig.out.*", "rndc.out.*", @@ -19,6 +21,11 @@ pytestmark = pytest.mark.extra_artifacts( ] ) +pytestmark = [ + isctest.mark.with_geoip2, + EXTRA_ARTIFACTS, +] + def test_geoip2(run_tests_sh): run_tests_sh() diff --git a/bin/tests/system/isctest/mark.py b/bin/tests/system/isctest/mark.py index f01b156503..75e24a85b7 100644 --- a/bin/tests/system/isctest/mark.py +++ b/bin/tests/system/isctest/mark.py @@ -120,6 +120,10 @@ with_libnghttp2 = pytest.mark.skipif( reason="libnghttp2 support disabled in the build", ) +with_geoip2 = pytest.mark.skipif( + os.getenv("FEATURE_GEOIP2") != "1", reason="GeoIP2 support disabled in the build" +) + dnsrps_enabled = pytest.mark.skipif( not is_dnsrps_available(), reason="dnsrps disabled in the build" )