diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index d5c6ddc2a..d2eb47deb 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -94,7 +94,7 @@ pre_initialize_variables () { CONFIG_H='include/mbedtls/config.h' CONFIG_BAK="$CONFIG_H.bak" - COMPONENTS= + ALL_EXCEPT=0 MEMORY=0 FORCE=0 KEEP_GOING=0 @@ -124,6 +124,19 @@ pre_initialize_variables () { ALL_COMPONENTS=$(sed -n 's/^ *component_\([0-9A-Z_a-z]*\) *().*/\1/p' <"$0") } +# Test whether $1 is excluded via $COMPONENTS (a space-separated list of +# wildcard patterns). +is_component_excluded() +{ + set -f + for pattern in $COMPONENTS; do + set +f + case ${1#component_} in $pattern) return 0;; esac + done + set +f + return 1 +} + usage() { cat <