From 135b98ef69e55efdc94e64df4a90e201d090af84 Mon Sep 17 00:00:00 2001 From: Paul Bakker Date: Wed, 25 May 2011 11:13:47 +0000 Subject: [PATCH] - Adapted to compile without POLARSSL_SELF_TEST defined --- programs/test/selftest.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/programs/test/selftest.c b/programs/test/selftest.c index 75bdd1fc8..4c43620e8 100644 --- a/programs/test/selftest.c +++ b/programs/test/selftest.c @@ -50,7 +50,7 @@ int main( int argc, char *argv[] ) { - int ret, v; + int ret = 0, v; if( argc == 2 && strcmp( argv[1], "-quiet" ) == 0 ) v = 0; @@ -60,6 +60,8 @@ int main( int argc, char *argv[] ) printf( "\n" ); } +#if defined(POLARSSL_SELF_TEST) + #if defined(POLARSSL_MD2_C) if( ( ret = md2_self_test( v ) ) != 0 ) return( ret ); @@ -135,6 +137,10 @@ int main( int argc, char *argv[] ) return( ret ); #endif +#else + printf( " POLARSSL_SELF_TEST not defined.\n" ); +#endif + if( v != 0 ) { printf( " [ All tests passed ]\n\n" );