mirror of
https://git.haproxy.org/git/haproxy.git/
synced 2025-08-06 23:27:04 +02:00
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. see8727614dc4
see5efc48dcf1
This commit is contained in:
parent
d8951ec70f
commit
8ee8b8a04d
@ -52,10 +52,6 @@ _help()
|
|||||||
#REQUIRE_SERVICE=prometheus-exporter
|
#REQUIRE_SERVICE=prometheus-exporter
|
||||||
#REQUIRE_SERVICES=prometheus-exporter,foo
|
#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
|
Configure environment variables to set the haproxy and vtest binaries to use
|
||||||
setenv HAPROXY_PROGRAM /usr/local/sbin/haproxy
|
setenv HAPROXY_PROGRAM /usr/local/sbin/haproxy
|
||||||
setenv VTEST_PROGRAM /usr/local/bin/vtest
|
setenv VTEST_PROGRAM /usr/local/bin/vtest
|
||||||
@ -124,15 +120,13 @@ _findtests() {
|
|||||||
set -- $(grep '^#[0-9A-Z_]*=' "$i")
|
set -- $(grep '^#[0-9A-Z_]*=' "$i")
|
||||||
IFS="$OLDIFS"
|
IFS="$OLDIFS"
|
||||||
|
|
||||||
require_version=""; require_version_below=""; require_options="";
|
require_options="";
|
||||||
require_services=""; exclude_targets=""; regtest_type=""
|
require_services=""; exclude_targets=""; regtest_type=""
|
||||||
requiredoption=""; requiredservice=""; excludedtarget="";
|
requiredoption=""; requiredservice=""; excludedtarget="";
|
||||||
|
|
||||||
while [ $# -gt 0 ]; do
|
while [ $# -gt 0 ]; do
|
||||||
v="$1"; v="${v#*=}"
|
v="$1"; v="${v#*=}"
|
||||||
case "$1" in
|
case "$1" in
|
||||||
"#REQUIRE_VERSION="*) require_version="$v" ;;
|
|
||||||
"#REQUIRE_VERSION_BELOW="*) require_version_below="$v" ;;
|
|
||||||
"#REQUIRE_OPTIONS="*) require_options="$v" ;;
|
"#REQUIRE_OPTIONS="*) require_options="$v" ;;
|
||||||
"#REQUIRE_SERVICES="*) require_services="$v" ;;
|
"#REQUIRE_SERVICES="*) require_services="$v" ;;
|
||||||
"#EXCLUDE_TARGETS="*) exclude_targets="$v" ;;
|
"#EXCLUDE_TARGETS="*) exclude_targets="$v" ;;
|
||||||
@ -171,21 +165,6 @@ _findtests() {
|
|||||||
IFS=","; set -- $require_services; IFS=$OLDIFS; require_services="$*"
|
IFS=","; set -- $require_services; IFS=$OLDIFS; require_services="$*"
|
||||||
IFS=","; set -- $exclude_targets; IFS=$OLDIFS; exclude_targets="$*"
|
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
|
for excludedtarget in $exclude_targets; do
|
||||||
if [ "$excludedtarget" = "$TARGET" ]; then
|
if [ "$excludedtarget" = "$TARGET" ]; then
|
||||||
echo " Skip $i because haproxy is compiled for the excluded target $TARGET"
|
echo " Skip $i because haproxy is compiled for the excluded target $TARGET"
|
||||||
|
Loading…
Reference in New Issue
Block a user