mirror of
https://github.com/espressif/mbedtls.git
synced 2025-05-09 19:31:18 +08:00
Allow compilation without MBEDTLS_SELF_TEST enabled
This commit is contained in:
parent
217efbcb4b
commit
70940caeeb
@ -106,8 +106,8 @@ static int run_test_snprintf( void )
|
|||||||
* self-test. If this fails, we attempt the test anyway, so no error is passed
|
* self-test. If this fails, we attempt the test anyway, so no error is passed
|
||||||
* back.
|
* back.
|
||||||
*/
|
*/
|
||||||
#if defined(MBEDTLS_ENTROPY_C) && defined(MBEDTLS_ENTROPY_NV_SEED) && \
|
#if defined(MBEDTLS_SELF_TEST) && defined(MBEDTLS_ENTROPY_C) && \
|
||||||
!defined(MBEDTLS_NO_PLATFORM_ENTROPY)
|
defined(MBEDTLS_ENTROPY_NV_SEED) && !defined(MBEDTLS_NO_PLATFORM_ENTROPY)
|
||||||
static void create_entropy_seed_file( void )
|
static void create_entropy_seed_file( void )
|
||||||
{
|
{
|
||||||
int result;
|
int result;
|
||||||
@ -138,7 +138,7 @@ static void create_entropy_seed_file( void )
|
|||||||
int main( int argc, char *argv[] )
|
int main( int argc, char *argv[] )
|
||||||
{
|
{
|
||||||
int v, suites_tested = 0, suites_failed = 0;
|
int v, suites_tested = 0, suites_failed = 0;
|
||||||
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C)
|
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && defined(MBEDTLS_SELF_TEST)
|
||||||
unsigned char buf[1000000];
|
unsigned char buf[1000000];
|
||||||
#endif
|
#endif
|
||||||
void *pointer;
|
void *pointer;
|
||||||
@ -396,10 +396,6 @@ int main( int argc, char *argv[] )
|
|||||||
suites_tested++;
|
suites_tested++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#else
|
|
||||||
mbedtls_printf( " MBEDTLS_SELF_TEST not defined.\n" );
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if( v != 0 )
|
if( v != 0 )
|
||||||
{
|
{
|
||||||
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && defined(MBEDTLS_MEMORY_DEBUG)
|
#if defined(MBEDTLS_MEMORY_BUFFER_ALLOC_C) && defined(MBEDTLS_MEMORY_DEBUG)
|
||||||
@ -416,6 +412,10 @@ int main( int argc, char *argv[] )
|
|||||||
suites_tested++;
|
suites_tested++;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#else
|
||||||
|
mbedtls_printf( " MBEDTLS_SELF_TEST not defined.\n" );
|
||||||
|
#endif
|
||||||
|
|
||||||
if( v != 0 )
|
if( v != 0 )
|
||||||
{
|
{
|
||||||
mbedtls_printf( " Executed %d test suites\n\n", suites_tested );
|
mbedtls_printf( " Executed %d test suites\n\n", suites_tested );
|
||||||
|
Loading…
x
Reference in New Issue
Block a user