#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
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" ;;
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"