From 7a11e72a4fe4a6c59cd2edda5459134303d7624c 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 | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh index 9a9629417..d2f36e693 100755 --- a/tests/ssl-opt.sh +++ b/tests/ssl-opt.sh @@ -553,6 +553,20 @@ 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 + + # should we skip? + if [ "X$SKIP_NEXT" = "XYES" ]; then + SKIP_NEXT="NO" + echo "SKIP" + SKIPS=$(( $SKIPS + 1 )) + return + fi + # fix client port if [ -n "$PXY_CMD" ]; then CLI_CMD=$( echo "$CLI_CMD" | sed s/+SRV_PORT/$PXY_PORT/g )