mirror of
https://github.com/Mbed-TLS/mbedtls.git
synced 2025-03-16 04:20:49 +00:00
Move config-suite-b.h testing to separate all.sh components
Signed-off-by: Gilles Peskine <Gilles.Peskine@arm.com>
This commit is contained in:
parent
68f511ec92
commit
b6d4913df9
@ -9,6 +9,72 @@
|
||||
#### Configuration Testing - TLS
|
||||
################################################################
|
||||
|
||||
component_test_config_suite_b_legacy () {
|
||||
msg "build: configs/config-suite-b.h"
|
||||
cp configs/config-suite-b.h "$CONFIG_H"
|
||||
# test-ref-configs works by overwriting mbedtls_config.h; this makes cmake
|
||||
# want to re-generate generated files that depend on it, quite correctly.
|
||||
# However this doesn't work as the generation script expects a specific
|
||||
# format for mbedtls_config.h, which the other files don't follow. Also,
|
||||
# cmake can't know this, but re-generation is actually not necessary as
|
||||
# the generated files only depend on the list of available options, not
|
||||
# whether they're on or off. So, disable cmake's (over-sensitive here)
|
||||
# dependency resolution for generated files and just rely on them being
|
||||
# present (thanks to pre_generate_files) by turning GEN_FILES off.
|
||||
CC=$ASAN_CC cmake -D GEN_FILES=Off -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
msg "test: configs/config-suite-b.h - unit tests"
|
||||
make test
|
||||
|
||||
msg "test: configs/config-suite-b.h - compat.sh"
|
||||
tests/compat.sh -m tls12 -f 'ECDHE_ECDSA.*AES.*GCM' -p mbedTLS
|
||||
|
||||
msg "build: configs/config-suite-b.h + DEBUG"
|
||||
MBEDTLS_TEST_CONFIGURATION="$MBEDTLS_TEST_CONFIGURATION+DEBUG"
|
||||
make clean
|
||||
scripts/config.py set MBEDTLS_DEBUG_C
|
||||
scripts/config.py set MBEDTLS_ERROR_C
|
||||
make ssl-opt
|
||||
|
||||
msg "test: configs/config-suite-b.h + DEBUG - ssl-opt.sh"
|
||||
tests/ssl-opt.sh
|
||||
}
|
||||
|
||||
component_test_config_suite_b_psa () {
|
||||
msg "build: configs/config-suite-b.h + USE_PSA_CRYPTO"
|
||||
cp configs/config-suite-b.h "$CONFIG_H"
|
||||
scripts/config.py set MBEDTLS_PSA_CRYPTO_C
|
||||
scripts/config.py set MBEDTLS_USE_PSA_CRYPTO
|
||||
# test-ref-configs works by overwriting mbedtls_config.h; this makes cmake
|
||||
# want to re-generate generated files that depend on it, quite correctly.
|
||||
# However this doesn't work as the generation script expects a specific
|
||||
# format for mbedtls_config.h, which the other files don't follow. Also,
|
||||
# cmake can't know this, but re-generation is actually not necessary as
|
||||
# the generated files only depend on the list of available options, not
|
||||
# whether they're on or off. So, disable cmake's (over-sensitive here)
|
||||
# dependency resolution for generated files and just rely on them being
|
||||
# present (thanks to pre_generate_files) by turning GEN_FILES off.
|
||||
CC=$ASAN_CC cmake -D GEN_FILES=Off -D CMAKE_BUILD_TYPE:String=Asan .
|
||||
make
|
||||
|
||||
msg "test: configs/config-suite-b.h + USE_PSA_CRYPTO - unit tests"
|
||||
make test
|
||||
|
||||
msg "test: configs/config-suite-b.h + USE_PSA_CRYPTO - compat.sh"
|
||||
tests/compat.sh -m tls12 -f 'ECDHE_ECDSA.*AES.*GCM' -p mbedTLS
|
||||
|
||||
msg "build: configs/config-suite-b.h + USE_PSA_CRYPTO + DEBUG"
|
||||
MBEDTLS_TEST_CONFIGURATION="$MBEDTLS_TEST_CONFIGURATION+DEBUG"
|
||||
make clean
|
||||
scripts/config.py set MBEDTLS_DEBUG_C
|
||||
scripts/config.py set MBEDTLS_ERROR_C
|
||||
make ssl-opt
|
||||
|
||||
msg "test: configs/config-suite-b.h + USE_PSA_CRYPTO + DEBUG - ssl-opt.sh"
|
||||
tests/ssl-opt.sh
|
||||
}
|
||||
|
||||
component_test_no_renegotiation () {
|
||||
msg "build: Default + !MBEDTLS_SSL_RENEGOTIATION (ASan build)" # ~ 6 min
|
||||
scripts/config.py unset MBEDTLS_SSL_RENEGOTIATION
|
||||
|
@ -16,11 +16,6 @@ use warnings;
|
||||
use strict;
|
||||
|
||||
my %configs = (
|
||||
'config-suite-b.h' => {
|
||||
'compat' => "-m tls12 -f 'ECDHE_ECDSA.*AES.*GCM' -p mbedTLS",
|
||||
'opt' => ' ',
|
||||
'opt_needs_debug' => 1,
|
||||
},
|
||||
'config-symmetric-only.h' => {
|
||||
},
|
||||
'config-tfm.h' => {
|
||||
|
Loading…
x
Reference in New Issue
Block a user