- Adapted to compile without POLARSSL_SELF_TEST defined

This commit is contained in:
Paul Bakker 2011-05-25 11:13:47 +00:00
parent e22d7030c6
commit 135b98ef69

View file

@ -50,7 +50,7 @@
int main( int argc, char *argv[] ) int main( int argc, char *argv[] )
{ {
int ret, v; int ret = 0, v;
if( argc == 2 && strcmp( argv[1], "-quiet" ) == 0 ) if( argc == 2 && strcmp( argv[1], "-quiet" ) == 0 )
v = 0; v = 0;
@ -60,6 +60,8 @@ int main( int argc, char *argv[] )
printf( "\n" ); printf( "\n" );
} }
#if defined(POLARSSL_SELF_TEST)
#if defined(POLARSSL_MD2_C) #if defined(POLARSSL_MD2_C)
if( ( ret = md2_self_test( v ) ) != 0 ) if( ( ret = md2_self_test( v ) ) != 0 )
return( ret ); return( ret );
@ -135,6 +137,10 @@ int main( int argc, char *argv[] )
return( ret ); return( ret );
#endif #endif
#else
printf( " POLARSSL_SELF_TEST not defined.\n" );
#endif
if( v != 0 ) if( v != 0 )
{ {
printf( " [ All tests passed ]\n\n" ); printf( " [ All tests passed ]\n\n" );