Move the geoip2 prereq.sh check to a with_geoip2 marker

Assisted-by: Claude:claude-opus-4-8
(cherry picked from commit cd627d9ae1)
This commit is contained in:
Nicki Křížek 2026-07-01 13:40:06 +00:00
parent 6942e2049b
commit e810dea4bd
3 changed files with 12 additions and 21 deletions

View file

@ -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

View file

@ -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()

View file

@ -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"
)