tests: crypto: mbedtls: Fix mbedTLS self test usage

All _self_test functions should be called only if MBEDTLS_SELF_TEST is
enabled.

Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
This commit is contained in:
Flavio Ceolin 2018-09-06 11:43:59 -07:00 committed by Anas Nashif
parent 8b70ace563
commit 502db21672

View file

@ -407,12 +407,14 @@ void test_mbedtls(void)
mbedtls_memory_buffer_alloc_status();
#endif
}
#if defined(MBEDTLS_SELF_TEST)
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
mbedtls_memory_buffer_alloc_free();
if (mbedtls_memory_buffer_alloc_self_test(v) != 0) {
suites_failed++;
}
suites_tested++;
#endif
#endif
if (v != 0) {