Commit Graph

12 Commits (master)

Author SHA1 Message Date
Rajkumar Kanagaraj f5002269c0 CMake: Limit the mbed-stubs-mbedtls to required dependency mocks 2021-07-12 07:18:41 -07:00
Rajkumar Kanagaraj d57ed8d95a CMake: Move mbedtls stub headers to the mbedtls doubles dir
Previously all the mbedtls stubs headers under mbed-stubs-headers,
so this PR move all mbedtls stubs headers under
mbedtls/tests/UNITTESTS/double directory and update CMake to include
stubs headers into mbed-stubs-mbedtls library to make mbedtls stubs
to be self-contained.
2021-07-12 07:19:04 -07:00
Rajkumar Kanagaraj ef7699d824 CMake: Update netsocket, lorawan unittest to use mbed-stubs-mbedtls
Update netsocket and lorawan unit tests to link with a mbed-stubs-mbedtls
library that it depends on instead of link with mbed-stubs
which is a group of stubs libraries.
2021-07-12 07:18:41 -07:00
Rajkumar Kanagaraj 66019cb80e CMake: Move mbedtls stubs to the mbedtls dir
Move the connectivity mbedtls stubs into the connectivity/mbedtls
component directory. So we can avoid duplicating the mbed-os source
tree in a central UNITTESTS folder.
2021-07-12 07:18:41 -07:00
Hari Limaye f95052cf6f CMake: Require TEST_SOURCES in greentea CMake file
Assumption that greentea test file is always named main.cpp is
incorrect. Updated mbed_greentea_add_test() macro to make TEST_SOURCES
parameter compulsory, which is used to specify greentea test
file(s). This allows tests to use C, or have a different name.
Therefore also updated all pre-existing greentea test CMake files to
explicity add main.cpp to TEST_SOURCES.
2021-06-29 13:33:42 +01:00
Lingkai Dong 49163f0f33 Move Mbed TLS self tests to a separate configuration
We potentially save flash space by not enabling Mbed TLS self-tests
by default. A new test config file, TESTS/configs/mbedtls.json, is
provided to enable self tests. This newly created JSON file also
enables timing in Mbed TLS so timing gets tested.
2021-06-15 10:50:14 +01:00
Lingkai Dong d6f825ebf0 mbedtls: Run mbedtls_timing_self_test if MBEDTLS_TIMING_C
This allows us to verify the support for Mbed TLS timing on Mbed OS.

Note: The macros MBEDTLS_TIMING_C and MBEDTLS_TIMING_ALT are not
enabled by default and need to be additionally enabled to run this
test.
2021-06-14 17:49:17 +01:00
Rajkumar Kanagaraj 6824b14e48 CMake: rename greentea test macro 2021-02-02 07:43:40 -08:00
Hugues Kamba 9a1c24e254 CMake: Add support for Mbed TLS Greentea tests
The Mbed TLS Greentea tests can now be built with CMake.
2021-01-25 10:48:15 +00:00
Devaraj Ranganna 61009ba05a tests: Limit PSA crypto tests to Arm-v7M targets
The PSA crypto tests in
connectivity/mbedtls/tests/TESTS/mbedtls/sanity/main.cpp are only
supported for Arm-v7M PSA targets. For Arm-v8M PSA targets, crypto
regression tests provided by TF-M are used. Refer to
https://github.com/ARMmbed/mbed-os-tf-m-regression-tests for more
information.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2021-01-14 11:56:04 +00:00
Devaraj Ranganna 9186fe57b2 tests: Fix test_crypto_asymmetric_encrypt_decrypt
The test `test_crypto_asymmetric_encrypt_decrypt` was incorrectly
setting the key usage flags. The key usage is updated to support both
encryption and decryption.

Signed-off-by: Devaraj Ranganna <devaraj.ranganna@arm.com>
2021-01-14 11:52:36 +00:00
George Psimenos bf3cf13cde Move mbedtls greentea tests 2020-08-11 11:32:08 +01:00