From e5f4958c8005fb14221ab5e49d07bf5806e5a502 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Fri, 25 Feb 2022 19:46:30 +0100 Subject: [PATCH] ssl-opt: automatically skip DTLS tests in builds without DTLS Signed-off-by: Gilles Peskine --- tests/ssl-opt.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index ced863a3f..7b82f3805 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -761,11 +761,7 @@ find_in_both() { # # Analyze and possibly instrument $PXY_CMD, $CLI_CMD, $SRV_CMD to pass # extra arguments or go through wrappers. -# Set $DTLS (0=TLS, 1=DTLS). analyze_test_commands() { - # update DTLS variable - detect_dtls "$SRV_CMD" - # if the test uses DTLS but no custom proxy, add a simple proxy # as it provides timing info that's useful to debug failures if [ -z "$PXY_CMD" ] && [ "$DTLS" -eq 1 ]; then @@ -1068,6 +1064,12 @@ run_test() { requires_config_enabled MBEDTLS_FS_IO;; esac + # Check if the test uses DTLS. + detect_dtls "$SRV_CMD" + if [ "$DTLS" -eq 1 ]; then + requires_config_enabled MBEDTLS_SSL_PROTO_DTLS + fi + # If the client or serve requires a ciphersuite, check that it's enabled. maybe_requires_ciphersuite_enabled "$SRV_CMD" "$@" maybe_requires_ciphersuite_enabled "$CLI_CMD" "$@"