@@ -48,8 +48,8 @@ component_test_crypto_with_static_key_slots() {
4848
4949 msg " test: crypto full + MBEDTLS_PSA_STATIC_KEY_SLOTS"
5050 cmake -D CMAKE_BUILD_TYPE:String=Asan .
51- make
52- make test
51+ cmake --build .
52+ ctest
5353}
5454
5555# check_renamed_symbols HEADER LIB
@@ -151,7 +151,7 @@ component_test_no_rsa_key_pair_generation () {
151151 cmake --build .
152152
153153 msg " test: default config minus PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_GENERATE"
154- make test
154+ ctest
155155}
156156
157157component_test_no_pem_no_fs () {
@@ -245,11 +245,11 @@ component_test_psa_external_rng_no_drbg_use_psa () {
245245 scripts/config.py unset MBEDTLS_CTR_DRBG_C
246246 scripts/config.py unset MBEDTLS_HMAC_DRBG_C
247247 scripts/config.py unset PSA_WANT_ALG_DETERMINISTIC_ECDSA # Requires HMAC_DRBG
248- CC= $ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan .
248+ cmake -D CMAKE_BUILD_TYPE:String=Asan .
249249 cmake --build .
250250
251251 msg " test: PSA_CRYPTO_EXTERNAL_RNG minus *_DRBG, PSA crypto - main suites"
252- make test
252+ ctest
253253
254254 msg " test: PSA_CRYPTO_EXTERNAL_RNG minus *_DRBG, PSA crypto - ssl-opt.sh (subset)"
255255 tests/ssl-opt.sh -f ' Default\|opaque'
@@ -262,11 +262,11 @@ component_test_psa_external_rng_use_psa_crypto () {
262262 scripts/config.py unset MBEDTLS_CTR_DRBG_C
263263 scripts/config.py unset MBEDTLS_ENTROPY_NV_SEED
264264 scripts/config.py unset MBEDTLS_PLATFORM_NV_SEED_ALT
265- CC= $ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan .
265+ cmake -D CMAKE_BUILD_TYPE:String=Asan .
266266 cmake --build .
267267
268268 msg " test: full + PSA_CRYPTO_EXTERNAL_RNG + USE_PSA_CRYPTO minus CTR_DRBG/NV_SEED"
269- make test
269+ ctest
270270
271271 msg " test: full + PSA_CRYPTO_EXTERNAL_RNG + USE_PSA_CRYPTO minus CTR_DRBG/NV_SEED"
272272 tests/ssl-opt.sh -f ' Default\|opaque'
@@ -279,15 +279,15 @@ component_full_no_pkparse_pkwrite () {
279279 scripts/config.py unset MBEDTLS_PK_PARSE_C
280280 scripts/config.py unset MBEDTLS_PK_WRITE_C
281281
282- CC= $ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan .
282+ cmake -D CMAKE_BUILD_TYPE:String=Asan .
283283 cmake --build .
284284
285285 # Ensure that PK_[PARSE|WRITE]_C were not re-enabled accidentally (additive config).
286286 not grep mbedtls_pk_parse_key ${BUILTIN_SRC_PATH} /pkparse.o
287287 not grep mbedtls_pk_write_key_der ${BUILTIN_SRC_PATH} /pkwrite.o
288288
289289 msg " test: full without pkparse and pkwrite"
290- make test
290+ ctest
291291}
292292
293293component_test_crypto_full_md_light_only () {
@@ -312,15 +312,15 @@ component_test_crypto_full_md_light_only () {
312312
313313 # Note: MD-light is auto-enabled in build_info.h by modules that need it,
314314 # which we haven't disabled, so no need to explicitly enable it.
315- CC= $ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan ../
315+ cmake -D CMAKE_BUILD_TYPE:String=Asan ../
316316 cmake --build .
317317
318318 # Make sure we don't have the HMAC functions, but the hashing functions
319319 not grep mbedtls_md_hmac ${MD_OBJECT_PATH} /md.c.o
320320 grep mbedtls_md ${MD_OBJECT_PATH} /md.c.o
321321
322322 msg " test: crypto_full with only the light subset of MD"
323- make test
323+ ctest
324324 cd .. && rm -r mdtest
325325}
326326
@@ -353,7 +353,7 @@ component_test_full_no_cipher () {
353353 not grep mbedtls_cipher_init ${BUILTIN_SRC_PATH} /cipher.o
354354
355355 msg " test: full no CIPHER"
356- make test
356+ ctest
357357}
358358
359359component_test_full_no_ccm () {
@@ -376,7 +376,7 @@ component_test_full_no_ccm () {
376376 cmake --build .
377377
378378 msg " test: full no PSA_WANT_ALG_CCM"
379- make test
379+ ctest
380380}
381381
382382component_test_full_no_ccm_star_no_tag () {
@@ -411,7 +411,7 @@ component_test_full_no_ccm_star_no_tag () {
411411 not grep mbedtls_psa_cipher ${PSA_CORE_PATH} /psa_crypto_cipher.o
412412
413413 msg " test: full no PSA_WANT_ALG_CCM_STAR_NO_TAG"
414- make test
414+ ctest
415415}
416416
417417component_test_config_symmetric_only () {
@@ -459,11 +459,11 @@ component_test_everest_curve25519_only () {
459459 scripts/config.py unset-all " PSA_WANT_ECC_[0-9A-Z_a-z]*$"
460460 scripts/config.py set PSA_WANT_ECC_MONTGOMERY_255
461461
462- CC= $ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan .
462+ cmake -D CMAKE_BUILD_TYPE:String=Asan .
463463 cmake --build .
464464
465465 msg " test: Everest ECDH context, only Curve25519" # ~ 50s
466- make test
466+ ctest
467467}
468468
469469component_test_psa_collect_statuses () {
@@ -509,7 +509,7 @@ component_test_crypto_for_psa_service () {
509509 scripts/config.py unset MBEDTLS_PK_WRITE_C
510510 CFLAGS=" -O1" cmake -D CMAKE_BUILD_TYPE:String=None .
511511 cmake --build .
512- make test
512+ ctest
513513 are_empty_libraries library/libmbedx509.* library/libmbedtls.*
514514}
515515
@@ -518,7 +518,7 @@ component_build_crypto_baremetal () {
518518 scripts/config.py crypto_baremetal
519519 CFLAGS=" -O1 -I$PWD /framework/tests/include/baremetal-override/" cmake -D CMAKE_BUILD_TYPE:String=None .
520520 cmake --build .
521- make test
521+ ctest
522522 are_empty_libraries library/libmbedx509.* library/libmbedtls.*
523523}
524524
@@ -563,11 +563,11 @@ component_test_psa_crypto_config_ffdh_2048_only () {
563563 scripts/config.py unset PSA_WANT_DH_RFC7919_6144
564564 scripts/config.py unset PSA_WANT_DH_RFC7919_8192
565565
566- CC= $ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan .
566+ cmake -D CMAKE_BUILD_TYPE:String=Asan .
567567 cmake --build .
568568
569569 msg " test: full config - only DH 2048"
570- make test
570+ ctest
571571
572572 msg " ssl-opt: full config - only DH 2048"
573573 tests/ssl-opt.sh -f " ffdh"
@@ -976,7 +976,7 @@ component_test_psa_crypto_config_reference_ecc_ecp_light_only () {
976976 cmake --build .
977977
978978 msg " test suites: full with non-accelerated EC algs"
979- make test
979+ ctest
980980
981981 msg " ssl-opt: full with non-accelerated EC algs"
982982 tests/ssl-opt.sh
@@ -1075,7 +1075,7 @@ component_test_psa_crypto_config_reference_ecc_no_ecp_at_all () {
10751075 cmake --build .
10761076
10771077 msg " test: full + non accelerated EC algs"
1078- make test
1078+ ctest
10791079
10801080 msg " ssl-opt: full + non accelerated EC algs"
10811081 tests/ssl-opt.sh
@@ -1242,7 +1242,7 @@ common_test_psa_crypto_config_reference_ecc_ffdh_no_bignum () {
12421242 cmake --build .
12431243
12441244 msg " test suites: full + non accelerated EC algs + USE_PSA"
1245- make test
1245+ ctest
12461246
12471247 msg " ssl-opt: full + non accelerated $accel_text algs + USE_PSA"
12481248 tests/ssl-opt.sh
@@ -1298,7 +1298,7 @@ component_test_tfm_config_p256m_driver_accel_ec () {
12981298 common_tfm_config
12991299
13001300 # Build crypto library
1301- CC= $ASAN_CC CFLAGS=" $ASAN_CFLAGS -I$PWD /framework/tests/include/spe" cmake -D CMAKE_BUILD_TYPE:String=Asan .
1301+ CFLAGS=" $ASAN_CFLAGS -I$PWD /framework/tests/include/spe" cmake -D CMAKE_BUILD_TYPE:String=Asan .
13021302 cmake --build .
13031303
13041304 # Make sure any built-in EC alg was not re-enabled by accident (additive config)
@@ -1318,7 +1318,7 @@ component_test_tfm_config_p256m_driver_accel_ec () {
13181318
13191319 # Run the tests
13201320 msg " test: TF-M config + p256m driver + accel ECDH(E)/ECDSA"
1321- make test
1321+ ctest
13221322}
13231323
13241324# Keep this in sync with component_test_tfm_config_p256m_driver_accel_ec() as
@@ -1342,7 +1342,7 @@ component_test_tfm_config_no_p256m () {
13421342 not grep mbedtls_cipher ${BUILTIN_SRC_PATH} /cipher.o
13431343
13441344 msg " test: TF-M config without p256m"
1345- make test
1345+ ctest
13461346}
13471347
13481348# This is an helper used by:
@@ -1366,11 +1366,11 @@ build_and_test_psa_want_key_pair_partial () {
13661366 # crypto_config.h so we just disable the one we don't want.
13671367 scripts/config.py unset " $disabled_psa_want "
13681368
1369- CC= $ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan .
1369+ cmake -D CMAKE_BUILD_TYPE:String=Asan .
13701370 cmake --build .
13711371
13721372 msg " test: $base_config - ${disabled_psa_want} "
1373- make test
1373+ ctest
13741374}
13751375
13761376component_test_psa_ecc_key_pair_no_derive () {
@@ -1450,7 +1450,7 @@ component_test_psa_crypto_config_reference_rsa_crypto () {
14501450 # Run the tests
14511451 # -------------
14521452 msg " test: crypto_full with non-accelerated RSA"
1453- make test
1453+ ctest
14541454}
14551455
14561456# This is a temporary test to verify that full RSA support is present even when
@@ -1484,7 +1484,7 @@ component_test_new_psa_want_key_pair_symbol () {
14841484 cmake --build .
14851485
14861486 msg " Test: crypto config - PSA_WANT_KEY_TYPE_RSA_KEY_PAIR_BASIC"
1487- make test
1487+ ctest
14881488
14891489 # Parse only 1 relevant line from the outcome file, i.e. a test which is
14901490 # performing RSA signature.
@@ -1604,7 +1604,7 @@ component_test_psa_crypto_config_reference_hash_use_psa () {
16041604 cmake --build .
16051605
16061606 msg " test: full without accelerated hashes"
1607- make test
1607+ ctest
16081608
16091609 msg " test: ssl-opt.sh, full without accelerated hashes"
16101610 tests/ssl-opt.sh
@@ -1674,7 +1674,7 @@ component_test_psa_crypto_config_reference_hmac () {
16741674 cmake --build .
16751675
16761676 msg " test: full without accelerated hmac"
1677- make test
1677+ ctest
16781678}
16791679
16801680component_test_psa_crypto_config_accel_aead () {
@@ -1779,7 +1779,7 @@ component_test_psa_crypto_config_reference_cipher_aead_cmac () {
17791779 cmake --build .
17801780
17811781 msg " test: full config with non-accelerated cipher inc. AEAD and CMAC"
1782- make test
1782+ ctest
17831783
17841784 msg " ssl-opt: full config with non-accelerated cipher inc. AEAD and CMAC"
17851785 # Exclude password-protected key tests as in test_psa_crypto_config_accel_cipher_aead_cmac.
@@ -1894,30 +1894,30 @@ component_test_full_block_cipher_legacy_dispatch () {
18941894 cmake --build .
18951895
18961896 msg " test: full + legacy dispatch in block_cipher"
1897- make test
1897+ ctest
18981898}
18991899
19001900component_test_aead_chachapoly_disabled () {
19011901 msg " build: full minus CHACHAPOLY"
19021902 scripts/config.py full
19031903 scripts/config.py unset PSA_WANT_ALG_CHACHA20_POLY1305
1904- CC= $ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan .
1904+ cmake -D CMAKE_BUILD_TYPE:String=Asan .
19051905 cmake --build .
19061906
19071907 msg " test: full minus CHACHAPOLY"
1908- make test
1908+ ctest
19091909}
19101910
19111911component_test_aead_only_ccm () {
19121912 msg " build: full minus CHACHAPOLY and GCM"
19131913 scripts/config.py full
19141914 scripts/config.py unset PSA_WANT_ALG_CHACHA20_POLY1305
19151915 scripts/config.py unset PSA_WANT_ALG_GCM
1916- CC= $ASAN_CC cmake -D CMAKE_BUILD_TYPE:String=Asan .
1916+ cmake -D CMAKE_BUILD_TYPE:String=Asan .
19171917 cmake --build .
19181918
19191919 msg " test: full minus CHACHAPOLY and GCM"
1920- make test
1920+ ctest
19211921}
19221922
19231923component_test_ccm_aes_sha256 () {
@@ -1930,7 +1930,7 @@ component_test_ccm_aes_sha256 () {
19301930 cmake -D CMAKE_BUILD_TYPE:String=Release .
19311931 cmake --build .
19321932 msg " test: CCM + AES + SHA256 configuration"
1933- make test
1933+ ctest
19341934}
19351935
19361936# Test that the given .o file builds with all (valid) combinations of the given options.
@@ -2125,7 +2125,7 @@ component_test_aes_only_128_bit_keys () {
21252125 cmake --build .
21262126
21272127 msg " test: default config + AES_ONLY_128_BIT_KEY_LENGTH"
2128- make test
2128+ ctest
21292129}
21302130
21312131component_test_no_ctr_drbg_aes_only_128_bit_keys () {
@@ -2138,7 +2138,7 @@ component_test_no_ctr_drbg_aes_only_128_bit_keys () {
21382138 cmake --build .
21392139
21402140 msg " test: default config + AES_ONLY_128_BIT_KEY_LENGTH - CTR_DRBG_C"
2141- make test
2141+ ctest
21422142}
21432143
21442144component_test_aes_only_128_bit_keys_have_builtins () {
@@ -2152,7 +2152,7 @@ component_test_aes_only_128_bit_keys_have_builtins () {
21522152 cmake --build .
21532153
21542154 msg " test: default config + AES_ONLY_128_BIT_KEY_LENGTH - AESNI_C - AESCE_C"
2155- make test
2155+ ctest
21562156
21572157 msg " selftest: default config + AES_ONLY_128_BIT_KEY_LENGTH - AESNI_C - AESCE_C"
21582158 programs/test/selftest
@@ -2168,7 +2168,7 @@ component_test_gcm_largetable () {
21682168 cmake --build .
21692169
21702170 msg " test: default config - GCM_LARGE_TABLE - AESNI_C - AESCE_C"
2171- make test
2171+ ctest
21722172}
21732173
21742174component_test_aes_fewer_tables () {
@@ -2178,7 +2178,7 @@ component_test_aes_fewer_tables () {
21782178 cmake --build .
21792179
21802180 msg " test: AES_FEWER_TABLES"
2181- make test
2181+ ctest
21822182}
21832183
21842184component_test_aes_rom_tables () {
@@ -2188,7 +2188,7 @@ component_test_aes_rom_tables () {
21882188 cmake --build .
21892189
21902190 msg " test: AES_ROM_TABLES"
2191- make test
2191+ ctest
21922192}
21932193
21942194component_test_aes_fewer_tables_and_rom_tables () {
@@ -2199,7 +2199,7 @@ component_test_aes_fewer_tables_and_rom_tables () {
21992199 cmake --build .
22002200
22012201 msg " test: AES_FEWER_TABLES + AES_ROM_TABLES"
2202- make test
2202+ ctest
22032203}
22042204
22052205# helper for component_test_block_cipher_no_decrypt_aesni() which:
@@ -2252,7 +2252,7 @@ helper_block_cipher_no_decrypt_build_test () {
22522252 not grep mbedtls_aesni_inverse_key ${BUILTIN_SRC_PATH} /aesni.o
22532253
22542254 msg " test: default config + BLOCK_CIPHER_NO_DECRYPT${set_opts: + + $set_opts }${unset_opts: + - $unset_opts } with $cflags ${ldflags: +, $ldflags } "
2255- make test
2255+ ctest
22562256
22572257 msg " selftest: default config + BLOCK_CIPHER_NO_DECRYPT${set_opts: + + $set_opts }${unset_opts: + - $unset_opts } with $cflags ${ldflags: +, $ldflags } "
22582258 programs/test/selftest
@@ -2390,10 +2390,10 @@ component_test_full_static_keystore () {
23902390 msg " build: full config - MBEDTLS_PSA_KEY_STORE_DYNAMIC"
23912391 scripts/config.py full
23922392 scripts/config.py unset MBEDTLS_PSA_KEY_STORE_DYNAMIC
2393- CC= $ASAN_CC CFLAGS=" $ASAN_CFLAGS -Os" LDFLAGS=" $ASAN_CFLAGS " cmake -D CMAKE_BUILD_TYPE:String=None .
2393+ CFLAGS=" $ASAN_CFLAGS -Os" LDFLAGS=" $ASAN_CFLAGS " cmake -D CMAKE_BUILD_TYPE:String=None .
23942394 cmake --build .
23952395 msg " test: full config - MBEDTLS_PSA_KEY_STORE_DYNAMIC"
2396- make test
2396+ ctest
23972397}
23982398
23992399component_test_psa_crypto_drivers () {
0 commit comments