From 51b5f00a4310d75b821a9deab62523c17a59a78b Mon Sep 17 00:00:00 2001 From: Pengyu Lv Date: Fri, 24 Feb 2023 15:38:52 +0800 Subject: [PATCH 1/5] all.sh: Skip build_mingw correctly If i686-w64-mingw32-gcc is not installed, then build_mingw should be unsupported. Signed-off-by: Pengyu Lv --- tests/scripts/all.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 7d91fa27d3..58fa4bf603 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -3647,8 +3647,8 @@ component_build_mingw () { make WINDOWS_BUILD=1 clean } support_build_mingw() { - case $(i686-w64-mingw32-gcc -dumpversion) in - [0-5]*) false;; + case $(i686-w64-mingw32-gcc -dumpversion 2>/dev/null) in + [0-5]*|"") false;; *) true;; esac } From df07003c496ede914c80b93380cf63af5291ee8e Mon Sep 17 00:00:00 2001 From: Pengyu Lv Date: Fri, 24 Feb 2023 16:03:31 +0800 Subject: [PATCH 2/5] all.sh: add support function for build_armcc With this change, "--list-components" will not list "build_armcc" on the system which is not installed with Arm Compilers. Signed-off-by: Pengyu Lv --- tests/scripts/all.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 58fa4bf603..273fed0199 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -3505,6 +3505,11 @@ component_build_armcc () { # ARM Compiler 6 - Target ARMv8.2-A - AArch64 armc6_build_test "-O1 --target=aarch64-arm-none-eabi -march=armv8.2-a+crypto" } +support_build_armcc () { + arm5_cc="$ARMC5_BIN_DIR/armcc" + arm6_cc="$ARMC6_BIN_DIR/armclang" + `check_tools "$arm5_cc" "$arm6_cc" > /dev/null 2>&1` +} component_test_tls13_only () { msg "build: default config with MBEDTLS_SSL_PROTO_TLS1_3, without MBEDTLS_SSL_PROTO_TLS1_2" From 55c4fa4f41b0e063d214e60475372696f0fc8173 Mon Sep 17 00:00:00 2001 From: Pengyu Lv Date: Fri, 24 Feb 2023 18:31:50 +0800 Subject: [PATCH 3/5] Check if the license server is available for armcc Signed-off-by: Pengyu Lv --- tests/scripts/all.sh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 273fed0199..e154535e45 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -3506,9 +3506,11 @@ component_build_armcc () { armc6_build_test "-O1 --target=aarch64-arm-none-eabi -march=armv8.2-a+crypto" } support_build_armcc () { - arm5_cc="$ARMC5_BIN_DIR/armcc" - arm6_cc="$ARMC6_BIN_DIR/armclang" - `check_tools "$arm5_cc" "$arm6_cc" > /dev/null 2>&1` + armc5_cc="$ARMC5_BIN_DIR/armcc" + armc6_cc="$ARMC6_BIN_DIR/armclang" + # check if Arm Compiler is installed and license server is available. + ("$armc5_cc" --help > /dev/null 2>&1) && \ + ("$armc6_cc" --help > /dev/null 2>&1) } component_test_tls13_only () { From c2b1864ceb5509007aa1255dd5bc5214b4fc17f9 Mon Sep 17 00:00:00 2001 From: Pengyu Lv Date: Wed, 1 Mar 2023 10:25:08 +0800 Subject: [PATCH 4/5] Revert "Check if the license server is available for armcc" This reverts commit 55c4fa4f41b0e063d214e60475372696f0fc8173. After discussion, We decided not to check the availability of the license server for the impacts on CI and user usages. Signed-off-by: Pengyu Lv --- tests/scripts/all.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index e154535e45..273fed0199 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -3506,11 +3506,9 @@ component_build_armcc () { armc6_build_test "-O1 --target=aarch64-arm-none-eabi -march=armv8.2-a+crypto" } support_build_armcc () { - armc5_cc="$ARMC5_BIN_DIR/armcc" - armc6_cc="$ARMC6_BIN_DIR/armclang" - # check if Arm Compiler is installed and license server is available. - ("$armc5_cc" --help > /dev/null 2>&1) && \ - ("$armc6_cc" --help > /dev/null 2>&1) + arm5_cc="$ARMC5_BIN_DIR/armcc" + arm6_cc="$ARMC6_BIN_DIR/armclang" + `check_tools "$arm5_cc" "$arm6_cc" > /dev/null 2>&1` } component_test_tls13_only () { From c6298ad46a79ae82923f4d44c247e70712c72ba0 Mon Sep 17 00:00:00 2001 From: Pengyu Lv Date: Wed, 1 Mar 2023 10:31:29 +0800 Subject: [PATCH 5/5] Use parentheses to avoid executing the output Signed-off-by: Pengyu Lv --- tests/scripts/all.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 273fed0199..2d2b3e2fcf 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -3506,9 +3506,9 @@ component_build_armcc () { armc6_build_test "-O1 --target=aarch64-arm-none-eabi -march=armv8.2-a+crypto" } support_build_armcc () { - arm5_cc="$ARMC5_BIN_DIR/armcc" - arm6_cc="$ARMC6_BIN_DIR/armclang" - `check_tools "$arm5_cc" "$arm6_cc" > /dev/null 2>&1` + armc5_cc="$ARMC5_BIN_DIR/armcc" + armc6_cc="$ARMC6_BIN_DIR/armclang" + (check_tools "$armc5_cc" "$armc6_cc" > /dev/null 2>&1) } component_test_tls13_only () {