diff --git a/reg-tests/ssl/set_ssl_cert.vtc b/reg-tests/ssl/set_ssl_cert.vtc index 1cdbd423c..9497be89c 100644 --- a/reg-tests/ssl/set_ssl_cert.vtc +++ b/reg-tests/ssl/set_ssl_cert.vtc @@ -9,6 +9,7 @@ varnishtest "Test the 'set ssl cert' feature of the CLI" #REQUIRE_OPTIONS=OPENSSL +#REQUIRE_BINARIES=socat,curl feature ignore_unknown_macro diff --git a/scripts/run-regtests.sh b/scripts/run-regtests.sh index c820d732c..7efc43007 100755 --- a/scripts/run-regtests.sh +++ b/scripts/run-regtests.sh @@ -63,6 +63,9 @@ _help() #REQUIRE_VERSION=0.0 #REQUIRE_VERSION_BELOW=99.9 + # To define required binaries for a test: + #REQUIRE_BINARIES=socat,curl + 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 @@ -129,6 +132,7 @@ _findtests() { require_version_below="$(sed -ne 's/^#REQUIRE_VERSION_BELOW=//p' "$i")" require_options="$(sed -ne 's/^#REQUIRE_OPTIONS=//p' "$i" | sed -e 's/,/ /g')" exclude_targets="$(sed -ne 's/^#EXCLUDE_TARGETS=//p' "$i" | sed -e 's/,/ /g')" + require_binaries="$(sed -ne 's/^#REQUIRE_BINARIES=//p' "$i" | sed -e 's/,/ /g')" if [ $any_test -ne 1 ] ; then regtest_type="$(sed -ne 's/^#REGTEST_TYPE=//p' "$i")" if [ -z $regtest_type ] ; then @@ -186,6 +190,14 @@ _findtests() { fi done + for requiredbin in $require_binaries; do + which $requiredbin >/dev/null 2>&1 + if [ "$?" -eq "1" ]; then + echo " Skip $i because '"$requiredbin"' is not installed" + skiptest=1 + fi + done + if [ -z $skiptest ]; then echo " Add test: $i" testlist="$testlist $i"