Merge pull request #291 from kaleb-himes/master

Fixes for disabling the crypt test and benchmark. Added new "./configure --disable-crypttests" option. Added new NO_CRYPT_BENCHMARK define.
This commit is contained in:
dgarske
2016-02-04 17:06:59 -08:00
6 changed files with 23 additions and 2 deletions

View File

@ -2236,6 +2236,14 @@ AS_IF([test "x$ENABLED_INLINE" = "xno"], [ENABLED_EXAMPLES="no"])
AS_IF([test "x$ENABLED_CRYPTONLY" = "xyes"], [ENABLED_EXAMPLES="no"])
AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$ENABLED_EXAMPLES" = "xyes"])
# Enable wolfCrypt test and benchmark
AC_ARG_ENABLE([crypttests],
[ --enable-crypttests Enable Crypt Bench/Test (default: enabled)],
[ ENABLED_CRYPT_TESTS=$enableval ],
[ ENABLED_CRYPT_TESTS=yes ]
)
AM_CONDITIONAL([BUILD_WOLFCRYPT_TESTS], [test "x$ENABLED_CRYPT_TESTS" = "xyes"])
# LIBZ
ENABLED_LIBZ="no"

View File

@ -110,9 +110,11 @@ int testsuite_test(int argc, char** argv)
server_args.signal = &ready;
InitTcpReady(&ready);
#ifndef NO_CRYPT_TEST
/* wc_ test */
wolfcrypt_test(&server_args);
if (server_args.return_code != 0) return server_args.return_code;
#endif
/* Simple wolfSSL client server test */
simple_test(&server_args);

View File

@ -2015,4 +2015,8 @@ static INLINE word64 get_intel_cycles(void)
}
#endif /* HAVE_GET_CYCLES */
#else
#ifndef NO_MAIN_DRIVER
int main() { return 0; }
#endif
#endif /* !NO_CRYPT_BENCHMARK */

View File

@ -1,11 +1,13 @@
# vim:ft=automake
# All paths should be given relative to the root
if BUILD_WOLFCRYPT_TESTS
noinst_PROGRAMS += wolfcrypt/benchmark/benchmark
wolfcrypt_benchmark_benchmark_SOURCES = wolfcrypt/benchmark/benchmark.c
wolfcrypt_benchmark_benchmark_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
wolfcrypt_benchmark_benchmark_DEPENDENCIES = src/libwolfssl.la
noinst_HEADERS += wolfcrypt/benchmark/benchmark.h
endif
EXTRA_DIST += wolfcrypt/benchmark/benchmark.sln
EXTRA_DIST += wolfcrypt/benchmark/benchmark.vcproj
DISTCLEANFILES+= wolfcrypt/benchmark/.libs/benchmark

View File

@ -1,6 +1,7 @@
# vim:ft=automake
# All paths should be given relative to the root
if BUILD_WOLFCRYPT_TESTS
noinst_PROGRAMS+= wolfcrypt/test/testwolfcrypt
if BUILD_CRYPTONLY
check_PROGRAMS+= wolfcrypt/test/testwolfcrypt
@ -10,6 +11,7 @@ wolfcrypt_test_testwolfcrypt_SOURCES = wolfcrypt/test/test.c
wolfcrypt_test_testwolfcrypt_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
wolfcrypt_test_testwolfcrypt_DEPENDENCIES = src/libwolfssl.la
noinst_HEADERS += wolfcrypt/test/test.h
endif
EXTRA_DIST += wolfcrypt/test/test.sln
EXTRA_DIST += wolfcrypt/test/test.vcproj
DISTCLEANFILES+= wolfcrypt/test/.libs/testwolfcrypt

View File

@ -7568,5 +7568,8 @@ int pkcs7signed_test(void)
}
#endif /* HAVE_PKCS7 */
#else
#ifndef NO_MAIN_DRIVER
int main() { return 0; }
#endif
#endif /* NO_CRYPT_TEST */