#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
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
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
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"
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)
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
fi
echo "Target : $TARGET"
-echo "Services : $SERVICES"
echo "########################## Gathering tests to run ##########################"