From e18fc7a4241f5d430945d20fa98c8a8781b5bbe3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Sz=C3=A9pk=C3=BAti?= Date: Tue, 5 May 2026 16:44:14 +0200 Subject: [PATCH 1/2] Add --select-group option to all-core.sh MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Bence Szépkúti --- scripts/all-core.sh | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/scripts/all-core.sh b/scripts/all-core.sh index 7f965d78c4..de40229aaa 100644 --- a/scripts/all-core.sh +++ b/scripts/all-core.sh @@ -325,6 +325,10 @@ Examples: Special options: -h|--help Print this help and exit. + --select-group + Filter the list of components to the members of group + . This affects the output of the following + --list-* options as well. --list-all-components List all available test components and exit. --list-components List components supported on this platform and exit. @@ -530,7 +534,9 @@ check_tools() pre_parse_command_line () { COMMAND_LINE_COMPONENTS= all_except=0 + select_group=all error_test=0 + list_all_components=0 list_components=0 restore_first=0 no_armcc= @@ -560,7 +566,7 @@ pre_parse_command_line () { --gnutls-serv) shift; GNUTLS_SERV="$1";; --help|-h) usage; exit;; --keep-going|-k) KEEP_GOING=1;; - --list-all-components) printf '%s\n' $ALL_COMPONENTS; exit;; + --list-all-components) list_all_components=1;; --list-components) list_components=1;; --memory|-m) MEMORY=1;; --no-append-outcome) append_outcome=0;; @@ -577,6 +583,7 @@ pre_parse_command_line () { --random-seed) unset SEED;; --release-test|-r) SEED=$RELEASE_SEED;; --restore) restore_first=1;; + --select-group) shift; select_group="$1";; --seed|-s) shift; SEED="$1";; -*) echo >&2 "Unknown option: $1" @@ -588,9 +595,29 @@ pre_parse_command_line () { shift done + # Exclude components not in the selected group + if [ "all" = "$select_group" ]; then + GROUP_COMPONENTS="$ALL_COMPONENTS" + else + GROUP_COMPONENTS= + for component in $ALL_COMPONENTS; do + case $(type "group_${select_group}_${component}" 2>&1) in + *' function'*) + if group_${select_group}_${component}; then + GROUP_COMPONENTS="$GROUP_COMPONENTS $component"; + fi;; + esac + done + fi + + if [ $list_all_components -eq 1 ]; then + printf '%s\n' $GROUP_COMPONENTS + exit + fi + # Exclude components that are not supported on this platform. SUPPORTED_COMPONENTS= - for component in $ALL_COMPONENTS; do + for component in $GROUP_COMPONENTS; do case $(type "support_$component" 2>&1) in *' function'*) if ! support_$component; then continue; fi;; From c3e7a35330545c0414d2ef5f9fdd20ccaa416afe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bence=20Sz=C3=A9pk=C3=BAti?= Date: Tue, 5 May 2026 16:46:38 +0200 Subject: [PATCH 2/2] Remove "=" after options from the help output MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit all.sh doesn't support parsing `--foo=bar` style of options, only the `--foo bar` style. Signed-off-by: Bence Szépkúti --- scripts/all-core.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/all-core.sh b/scripts/all-core.sh index de40229aaa..1ee9055b2f 100644 --- a/scripts/all-core.sh +++ b/scripts/all-core.sh @@ -338,16 +338,16 @@ General options: -k|--keep-going Run all tests and report errors at the end. -m|--memory Additional optional memory tests. --append-outcome Append to the outcome file (if used). - --arm-none-eabi-gcc-prefix= + --arm-none-eabi-gcc-prefix Prefix for a cross-compiler for arm-none-eabi (default: "${ARM_NONE_EABI_GCC_PREFIX}") - --arm-linux-gnueabi-gcc-prefix= + --arm-linux-gnueabi-gcc-prefix Prefix for a cross-compiler for arm-linux-gnueabi (default: "${ARM_LINUX_GNUEABI_GCC_PREFIX}") - --arm-linux-gnueabihf-gcc-prefix= + --arm-linux-gnueabihf-gcc-prefix Prefix for a cross-compiler for arm-linux-gnueabihf (default: "${ARM_LINUX_GNUEABIHF_GCC_PREFIX}") - --aarch64-linux-gnu-gcc-prefix= + --aarch64-linux-gnu-gcc-prefix Prefix for a cross-compiler for aarch64-linux-gnu (default: "${AARCH64_LINUX_GNU_GCC_PREFIX}") --armcc Run ARM Compiler builds (on by default). @@ -364,23 +364,23 @@ General options: --no-keep-going Stop at the first error (default). --no-memory No additional memory tests (default). --no-quiet Print full output from components. - --out-of-source-dir= Directory used for CMake out-of-source build tests. - --outcome-file= File where test outcomes are written (not done if + --out-of-source-dir Directory used for CMake out-of-source build tests. + --outcome-file File where test outcomes are written (not done if empty; default: \$MBEDTLS_TEST_OUTCOME_FILE). --random-seed Use a random seed value for randomized tests (default). -r|--release-test Run this script in release mode. This fixes the seed value to ${RELEASE_SEED}. -s|--seed Integer seed value to use for this test run. Tool path options: - --armc6-bin-dir= ARM Compiler 6 bin directory. - --clang-earliest= Earliest version of clang available - --clang-latest= Latest version of clang available - --gcc-earliest= Earliest version of GCC available - --gcc-latest= Latest version of GCC available - --gnutls-cli= GnuTLS client executable to use for most tests. - --gnutls-serv= GnuTLS server executable to use for most tests. - --openssl= OpenSSL executable to use for most tests. - --openssl-next= OpenSSL executable to use for recent things like ARIA + --armc6-bin-dir ARM Compiler 6 bin directory. + --clang-earliest Earliest version of clang available + --clang-latest Latest version of clang available + --gcc-earliest Earliest version of GCC available + --gcc-latest Latest version of GCC available + --gnutls-cli GnuTLS client executable to use for most tests. + --gnutls-serv GnuTLS server executable to use for most tests. + --openssl OpenSSL executable to use for most tests. + --openssl-next OpenSSL executable to use for recent things like ARIA EOF }