REGTESTS: Remove support for REQUIRE_VERSION and REQUIRE_VERSION_BELOW

This is no longer used since the migration to the native `haproxy -cc
'version_atleast(X)'` functionality.

see 8727614dc4046e91997ecce421bcb6a5537cac93
see 5efc48dcf1b133dd415c759e83b21d52dc303786
This commit is contained in:
Tim Duesterhus 2025-06-01 15:26:40 +02:00 committed by Christopher Faulet
parent d8951ec70f
commit 8ee8b8a04d

View File

@ -52,10 +52,6 @@ _help()
#REQUIRE_SERVICE=prometheus-exporter
#REQUIRE_SERVICES=prometheus-exporter,foo
# To define a range of versions that a test can run with:
#REQUIRE_VERSION=0.0
#REQUIRE_VERSION_BELOW=99.9
Configure environment variables to set the haproxy and vtest binaries to use
setenv HAPROXY_PROGRAM /usr/local/sbin/haproxy
setenv VTEST_PROGRAM /usr/local/bin/vtest
@ -124,15 +120,13 @@ _findtests() {
set -- $(grep '^#[0-9A-Z_]*=' "$i")
IFS="$OLDIFS"
require_version=""; require_version_below=""; require_options="";
require_options="";
require_services=""; exclude_targets=""; regtest_type=""
requiredoption=""; requiredservice=""; excludedtarget="";
while [ $# -gt 0 ]; do
v="$1"; v="${v#*=}"
case "$1" in
"#REQUIRE_VERSION="*) require_version="$v" ;;
"#REQUIRE_VERSION_BELOW="*) require_version_below="$v" ;;
"#REQUIRE_OPTIONS="*) require_options="$v" ;;
"#REQUIRE_SERVICES="*) require_services="$v" ;;
"#EXCLUDE_TARGETS="*) exclude_targets="$v" ;;
@ -171,21 +165,6 @@ _findtests() {
IFS=","; set -- $require_services; IFS=$OLDIFS; require_services="$*"
IFS=","; set -- $exclude_targets; IFS=$OLDIFS; exclude_targets="$*"
if [ -n "$require_version" ]; then
if [ $(_version "$HAPROXY_VERSION") -lt $(_version "$require_version") ]; then
echo " Skip $i because option haproxy is version: $HAPROXY_VERSION"
echo " REASON: this test requires at least version: $require_version"
skiptest=1
fi
fi
if [ -n "$require_version_below" ]; then
if [ $(_version "$HAPROXY_VERSION") -ge $(_version "$require_version_below") ]; then
echo " Skip $i because option haproxy is version: $HAPROXY_VERSION"
echo " REASON: this test requires a version below: $require_version_below"
skiptest=1
fi
fi
for excludedtarget in $exclude_targets; do
if [ "$excludedtarget" = "$TARGET" ]; then
echo " Skip $i because haproxy is compiled for the excluded target $TARGET"