From 91e72c312154d4eb62ab276eff6cfbd64704e026 Mon Sep 17 00:00:00 2001 From: Hanno Becker Date: Fri, 10 May 2019 14:38:42 +0100 Subject: [PATCH] ssl-opt.sh: Auto-skip tests that use files if MBEDTLS_FS_IO unset This should allow to run ssl-opt.sh successfully in the default configuration minus MBEDTLS_PEM_PARSE_C minus MBEDTLS_FS_IO. --- tests/ssl-opt.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index cef87bceb..2780a3216 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -551,6 +551,12 @@ run_test() { CLI_EXPECT="$3" shift 3 + # Check if test uses files + TEST_USES_FILES=$(echo "$SRV_CMD $CLI_CMD" | grep "\.\(key\|crt\|pem\)" ) + if [ ! -z "$TEST_USES_FILES" ]; then + requires_config_enabled MBEDTLS_FS_IO + fi + # Check if server forces ciphersuite FORCE_CIPHERSUITE=$(echo "$SRV_CMD" | sed -n 's/^.*force_ciphersuite=\([a-zA-Z0-9\-]*\).*$/\1/p') if [ ! -z "$FORCE_CIPHERSUITE" ]; then