From 54ada8bae8ade96010d1005964d782bdb0e3084f Mon Sep 17 00:00:00 2001 From: Dave Rodgman Date: Wed, 4 Oct 2023 11:55:25 +0100 Subject: [PATCH] Improve docs Signed-off-by: Dave Rodgman --- tests/scripts/all.sh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 33a2c9f49..34089a402 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -3934,14 +3934,17 @@ component_build_tfm() { make lib CC="gcc" CFLAGS="-Os -std=c99 -Werror -Wall -Wextra -Wwrite-strings -Wpointer-arith -Wshadow -Wvla -Wformat=2 -Wno-format-nonliteral -Wshadow -Wformat-signedness -Wlogical-op -I../tests/include/spe" } +# Test that the given .o file builds with all (valid) combinations of the given options. +# +# Syntax: build_test_config_combos FILE VALIDATOR_FUNCTION OPT1 OPT2 ... +# +# The validator function is the name of a function to validate the combination of options. +# It may be "" if all combinations are valid. +# It receives a string containing a combination of options, as passed to the compiler, +# e.g. "-DOPT1 -DOPT2 ...". It must echo something iff the combination is invalid. build_test_config_combos() { - # test that the given file builds with all (valid) combinations of the given options. - # syntax: build_test_config_combos FILE VALIDATOR_FUNCTION OPT1 OPT2 ... - # The validator function may be "" if all combinations are valid - file=$1 shift - # this function must echo something iff the clang "-DA -DB ..." string is invalid validate_options=$1 shift options=("$@")