From dbf7b7eeb5712df6651c7e360a55b82633bd7d14 Mon Sep 17 00:00:00 2001 From: Gilles Peskine Date: Thu, 7 Oct 2021 19:34:57 +0200 Subject: [PATCH] Switch cmake -O2 builds around to where we test a lot Use Release mode (-O2) for component_test_full_cmake_clang which runs SSL tests. To have some coverage with Check mode (which enables more compiler warnings but compiles with -Os), change a few other builds that only run unit tests at most to Check mode. Don't add any new builds, to keep the total build volume down. We don't need extensive coverage of all combinations, just a reasonable set. Signed-off-by: Gilles Peskine --- tests/scripts/all.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/scripts/all.sh b/tests/scripts/all.sh index 5bc9a3d276..646055d63b 100755 --- a/tests/scripts/all.sh +++ b/tests/scripts/all.sh @@ -1283,7 +1283,7 @@ component_test_psa_collect_statuses () { component_test_full_cmake_clang () { msg "build: cmake, full config, clang" # ~ 50s scripts/config.py full - CC=clang cmake -D CMAKE_BUILD_TYPE:String=Check -D ENABLE_TESTING=On . + CC=clang cmake -D CMAKE_BUILD_TYPE:String=Release -D ENABLE_TESTING=On . make msg "test: main suites (full config, clang)" # ~ 5s @@ -1926,7 +1926,8 @@ component_build_no_std_function () { scripts/config.py set MBEDTLS_PLATFORM_NO_STD_FUNCTIONS scripts/config.py unset MBEDTLS_ENTROPY_NV_SEED scripts/config.py unset MBEDTLS_PLATFORM_NV_SEED_ALT - make CC=gcc CFLAGS='-Werror -Wall -Wextra -Os' + CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Check + make } component_build_no_ssl_srv () { @@ -2094,7 +2095,7 @@ component_test_when_no_ciphersuites_have_mac () { component_test_no_date_time () { msg "build: default config without MBEDTLS_HAVE_TIME_DATE" scripts/config.py unset MBEDTLS_HAVE_TIME_DATE - CC=gcc cmake + CC=gcc cmake -D CMAKE_BUILD_TYPE:String=Check make msg "test: !MBEDTLS_HAVE_TIME_DATE - main suites" @@ -2633,7 +2634,7 @@ component_test_cmake_out_of_source () { MBEDTLS_ROOT_DIR="$PWD" mkdir "$OUT_OF_SOURCE_DIR" cd "$OUT_OF_SOURCE_DIR" - cmake "$MBEDTLS_ROOT_DIR" + cmake -D CMAKE_BUILD_TYPE:String=Check "$MBEDTLS_ROOT_DIR" make msg "test: cmake 'out-of-source' build"