From: Tim Duesterhus Date: Fri, 3 Jul 2026 21:02:35 +0000 (+0200) Subject: REGTESTS: Remove support for `REQUIRE_OPTION` from scripts/run-regtests.sh X-Git-Tag: v3.5-dev2~7 X-Git-Url: http://git.kaiwu.me/%22data:,/static/$%7BGITURL%7D/1?a=commitdiff_plain;h=1e3631734618adbbc9526b4f79bffcaae1db36b2;p=haproxy.git REGTESTS: Remove support for `REQUIRE_OPTION` from scripts/run-regtests.sh This is no longer used in tests and thus can be removed from the test runner. --- diff --git a/scripts/run-regtests.sh b/scripts/run-regtests.sh index c3369bf69..912c7a8cc 100755 --- a/scripts/run-regtests.sh +++ b/scripts/run-regtests.sh @@ -45,10 +45,6 @@ _help() #EXCLUDE_TARGETS=dos,freebsd,windows - # Below option is required to complete this test successfully - #REQUIRE_OPTION=OPENSSL, this test needs OPENSSL compiled in. - #REQUIRE_OPTIONS=ZLIB|SLZ,OPENSSL,LUA - #REQUIRE_SERVICE=prometheus-exporter #REQUIRE_SERVICES=prometheus-exporter,foo @@ -81,18 +77,15 @@ _findtests() { set -- $(grep '^#[0-9A-Z_]*=' "$i") IFS="$OLDIFS" - require_options=""; require_services=""; exclude_targets=""; regtest_type="" - requiredoption=""; requiredservice=""; excludedtarget=""; + requiredservice=""; excludedtarget=""; while [ $# -gt 0 ]; do v="$1"; v="${v#*=}" case "$1" in - "#REQUIRE_OPTIONS="*) require_options="$v" ;; "#REQUIRE_SERVICES="*) require_services="$v" ;; "#EXCLUDE_TARGETS="*) exclude_targets="$v" ;; "#REGTEST_TYPE="*) regtest_type="$v" ;; - "#REQUIRE_OPTION="*) requiredoption="${v%,*}" ;; "#REQUIRE_SERVICE="*) required_service="${v%,*}" ;; "#EXCLUDE_TARGET="*) excludedtarget="${v%,*}" ;; # Note: any new variable declared here must be initialized above. @@ -110,10 +103,6 @@ _findtests() { fi fi - if [ -n "$requiredoption" ]; then - require_options="$require_options,$requiredoption" - fi - if [ -n "$requiredservice" ]; then require_services="$require_services,$requiredservice" fi @@ -122,7 +111,6 @@ _findtests() { exclude_targets="$exclude_targets,$excludedtarget" fi - IFS=","; set -- $require_options; IFS=$OLDIFS; require_options="$*" IFS=","; set -- $require_services; IFS=$OLDIFS; require_services="$*" IFS=","; set -- $exclude_targets; IFS=$OLDIFS; exclude_targets="$*" @@ -133,20 +121,6 @@ _findtests() { fi done - for requiredoption in $require_options; do - IFS="|"; set -- $requiredoption; IFS=$OLDIFS; alternatives="$*" - found= - for alt in $alternatives; do - if [ -z "${FEATURES_PATTERN##* +$alt *}" ]; then - found=1; - fi - done - if [ -z $found ]; then - echo " Skipped $i because haproxy is not compiled with the required option $requiredoption" >> "${TESTDIR}/skipped.log" - skiptest=1 - fi - done - for requiredservice in $require_services; do IFS="|"; set -- $requiredservice; IFS=$OLDIFS; alternatives="$*" found= @@ -275,8 +249,8 @@ if [ $preparefailed ]; then exit 1 fi -{ read HAPROXY_VERSION; read TARGET; read FEATURES; read SERVICES; } << EOF -$($HAPROXY_PROGRAM $HAPROXY_ARGS -vv | grep -E 'HA-?Proxy version|TARGET.*=|^Feature|^Available services' | sed 's/.* [:=] //') +{ read HAPROXY_VERSION; read TARGET; read SERVICES; } << EOF +$($HAPROXY_PROGRAM $HAPROXY_ARGS -vv | grep -E 'HA-?Proxy version|TARGET.*=|^Available services' | sed 's/.* [:=] //') EOF HAPROXY_VERSION=$(echo $HAPROXY_VERSION | cut -d " " -f 3) @@ -288,7 +262,6 @@ if [ -z "${PROJECT_VERSION}${MAKE}" ]; then PROJECT_VERSION=$(gmake version 2>&1 | grep -E '^VERSION:|^SUBVERS:'|cut -f2 -d' '|tr -d '\012') fi -FEATURES_PATTERN=" $FEATURES " SERVICES_PATTERN=" $SERVICES " TESTRUNDATETIME="$(date '+%Y-%m-%d_%H-%M-%S')" @@ -303,7 +276,6 @@ if [ -n "$HAPROXY_ARGS" ]; then fi echo "Target : $TARGET" -echo "Options : $FEATURES" echo "Services : $SERVICES" echo "########################## Gathering tests to run ##########################"