mirror of
https://github.com/haproxy/haproxy.git
synced 2026-07-11 18:15:49 -04:00
REGTESTS: Remove support for REQUIRE_SERVICE from scripts/run-regtests.sh
This is no longer used in tests and thus can be removed from the test runner.
This commit is contained in:
parent
e4dceb44a3
commit
3a3a347c72
1 changed files with 3 additions and 31 deletions
|
|
@ -45,9 +45,6 @@ _help()
|
|||
|
||||
#EXCLUDE_TARGETS=dos,freebsd,windows
|
||||
|
||||
#REQUIRE_SERVICE=prometheus-exporter
|
||||
#REQUIRE_SERVICES=prometheus-exporter,foo
|
||||
|
||||
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
|
||||
|
|
@ -77,16 +74,13 @@ _findtests() {
|
|||
set -- $(grep '^#[0-9A-Z_]*=' "$i")
|
||||
IFS="$OLDIFS"
|
||||
|
||||
require_services=""; exclude_targets=""; regtest_type=""
|
||||
requiredservice=""; excludedtarget="";
|
||||
exclude_targets=""; regtest_type=""; excludedtarget=""
|
||||
|
||||
while [ $# -gt 0 ]; do
|
||||
v="$1"; v="${v#*=}"
|
||||
case "$1" in
|
||||
"#REQUIRE_SERVICES="*) require_services="$v" ;;
|
||||
"#EXCLUDE_TARGETS="*) exclude_targets="$v" ;;
|
||||
"#REGTEST_TYPE="*) regtest_type="$v" ;;
|
||||
"#REQUIRE_SERVICE="*) required_service="${v%,*}" ;;
|
||||
"#EXCLUDE_TARGET="*) excludedtarget="${v%,*}" ;;
|
||||
# Note: any new variable declared here must be initialized above.
|
||||
esac
|
||||
|
|
@ -103,15 +97,10 @@ _findtests() {
|
|||
fi
|
||||
fi
|
||||
|
||||
if [ -n "$requiredservice" ]; then
|
||||
require_services="$require_services,$requiredservice"
|
||||
fi
|
||||
|
||||
if [ -n "$excludedtarget" ]; then
|
||||
exclude_targets="$exclude_targets,$excludedtarget"
|
||||
fi
|
||||
|
||||
IFS=","; set -- $require_services; IFS=$OLDIFS; require_services="$*"
|
||||
IFS=","; set -- $exclude_targets; IFS=$OLDIFS; exclude_targets="$*"
|
||||
|
||||
for excludedtarget in $exclude_targets; do
|
||||
|
|
@ -121,20 +110,6 @@ _findtests() {
|
|||
fi
|
||||
done
|
||||
|
||||
for requiredservice in $require_services; do
|
||||
IFS="|"; set -- $requiredservice; IFS=$OLDIFS; alternatives="$*"
|
||||
found=
|
||||
for alt in $alternatives; do
|
||||
if [ -z "${SERVICES_PATTERN##* $alt *}" ]; then
|
||||
found=1;
|
||||
fi
|
||||
done
|
||||
if [ -z $found ]; then
|
||||
echo " Skipped $i because haproxy is not compiled with the required service $requiredservice" >> "${TESTDIR}/skipped.log"
|
||||
skiptest=1
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z $skiptest ]; then
|
||||
echo " Add test: $i"
|
||||
testlist="$testlist $i"
|
||||
|
|
@ -249,8 +224,8 @@ if [ $preparefailed ]; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
{ read HAPROXY_VERSION; read TARGET; read SERVICES; } << EOF
|
||||
$($HAPROXY_PROGRAM $HAPROXY_ARGS -vv | grep -E 'HA-?Proxy version|TARGET.*=|^Available services' | sed 's/.* [:=] //')
|
||||
{ read HAPROXY_VERSION; read TARGET; } << EOF
|
||||
$($HAPROXY_PROGRAM $HAPROXY_ARGS -vv | grep -E 'HA-?Proxy version|TARGET.*=' | sed 's/.* [:=] //')
|
||||
EOF
|
||||
|
||||
HAPROXY_VERSION=$(echo $HAPROXY_VERSION | cut -d " " -f 3)
|
||||
|
|
@ -262,8 +237,6 @@ if [ -z "${PROJECT_VERSION}${MAKE}" ]; then
|
|||
PROJECT_VERSION=$(gmake version 2>&1 | grep -E '^VERSION:|^SUBVERS:'|cut -f2 -d' '|tr -d '\012')
|
||||
fi
|
||||
|
||||
SERVICES_PATTERN=" $SERVICES "
|
||||
|
||||
TESTRUNDATETIME="$(date '+%Y-%m-%d_%H-%M-%S')"
|
||||
|
||||
mkdir -p "$TESTDIR" || exit 1
|
||||
|
|
@ -276,7 +249,6 @@ if [ -n "$HAPROXY_ARGS" ]; then
|
|||
fi
|
||||
|
||||
echo "Target : $TARGET"
|
||||
echo "Services : $SERVICES"
|
||||
|
||||
echo "########################## Gathering tests to run ##########################"
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue