forked from wolfSSL/wolfssl
Fixes for disabling the crypt test and benchmark. Added new "./configure --disable-crypttests" option. Also made sure use of both NO_CRYPT_BENCHMARK and NO_CRYPT_TEST in "./configure CFLAGS=-D" scenario work correctly.
This commit is contained in:
@ -2236,6 +2236,14 @@ AS_IF([test "x$ENABLED_INLINE" = "xno"], [ENABLED_EXAMPLES="no"])
|
|||||||
AS_IF([test "x$ENABLED_CRYPTONLY" = "xyes"], [ENABLED_EXAMPLES="no"])
|
AS_IF([test "x$ENABLED_CRYPTONLY" = "xyes"], [ENABLED_EXAMPLES="no"])
|
||||||
AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$ENABLED_EXAMPLES" = "xyes"])
|
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
|
# LIBZ
|
||||||
ENABLED_LIBZ="no"
|
ENABLED_LIBZ="no"
|
||||||
|
@ -110,10 +110,12 @@ int testsuite_test(int argc, char** argv)
|
|||||||
server_args.signal = &ready;
|
server_args.signal = &ready;
|
||||||
InitTcpReady(&ready);
|
InitTcpReady(&ready);
|
||||||
|
|
||||||
|
#ifndef NO_CRYPT_TEST
|
||||||
/* wc_ test */
|
/* wc_ test */
|
||||||
wolfcrypt_test(&server_args);
|
wolfcrypt_test(&server_args);
|
||||||
if (server_args.return_code != 0) return server_args.return_code;
|
if (server_args.return_code != 0) return server_args.return_code;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Simple wolfSSL client server test */
|
/* Simple wolfSSL client server test */
|
||||||
simple_test(&server_args);
|
simple_test(&server_args);
|
||||||
if (server_args.return_code != 0) return server_args.return_code;
|
if (server_args.return_code != 0) return server_args.return_code;
|
||||||
|
@ -2016,5 +2016,7 @@ static INLINE word64 get_intel_cycles(void)
|
|||||||
|
|
||||||
#endif /* HAVE_GET_CYCLES */
|
#endif /* HAVE_GET_CYCLES */
|
||||||
#else
|
#else
|
||||||
int main() { return 0; }
|
#ifndef NO_MAIN_DRIVER
|
||||||
|
int main() { return 0; }
|
||||||
|
#endif
|
||||||
#endif /* !NO_CRYPT_BENCHMARK */
|
#endif /* !NO_CRYPT_BENCHMARK */
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
# vim:ft=automake
|
# vim:ft=automake
|
||||||
# All paths should be given relative to the root
|
# All paths should be given relative to the root
|
||||||
|
|
||||||
|
if BUILD_WOLFCRYPT_TESTS
|
||||||
noinst_PROGRAMS += wolfcrypt/benchmark/benchmark
|
noinst_PROGRAMS += wolfcrypt/benchmark/benchmark
|
||||||
wolfcrypt_benchmark_benchmark_SOURCES = wolfcrypt/benchmark/benchmark.c
|
wolfcrypt_benchmark_benchmark_SOURCES = wolfcrypt/benchmark/benchmark.c
|
||||||
wolfcrypt_benchmark_benchmark_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
|
wolfcrypt_benchmark_benchmark_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
|
||||||
wolfcrypt_benchmark_benchmark_DEPENDENCIES = src/libwolfssl.la
|
wolfcrypt_benchmark_benchmark_DEPENDENCIES = src/libwolfssl.la
|
||||||
noinst_HEADERS += wolfcrypt/benchmark/benchmark.h
|
noinst_HEADERS += wolfcrypt/benchmark/benchmark.h
|
||||||
|
endif
|
||||||
EXTRA_DIST += wolfcrypt/benchmark/benchmark.sln
|
EXTRA_DIST += wolfcrypt/benchmark/benchmark.sln
|
||||||
EXTRA_DIST += wolfcrypt/benchmark/benchmark.vcproj
|
EXTRA_DIST += wolfcrypt/benchmark/benchmark.vcproj
|
||||||
DISTCLEANFILES+= wolfcrypt/benchmark/.libs/benchmark
|
DISTCLEANFILES+= wolfcrypt/benchmark/.libs/benchmark
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
# vim:ft=automake
|
# vim:ft=automake
|
||||||
# All paths should be given relative to the root
|
# All paths should be given relative to the root
|
||||||
|
|
||||||
|
if BUILD_WOLFCRYPT_TESTS
|
||||||
noinst_PROGRAMS+= wolfcrypt/test/testwolfcrypt
|
noinst_PROGRAMS+= wolfcrypt/test/testwolfcrypt
|
||||||
if BUILD_CRYPTONLY
|
if BUILD_CRYPTONLY
|
||||||
check_PROGRAMS+= wolfcrypt/test/testwolfcrypt
|
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_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
|
||||||
wolfcrypt_test_testwolfcrypt_DEPENDENCIES = src/libwolfssl.la
|
wolfcrypt_test_testwolfcrypt_DEPENDENCIES = src/libwolfssl.la
|
||||||
noinst_HEADERS += wolfcrypt/test/test.h
|
noinst_HEADERS += wolfcrypt/test/test.h
|
||||||
|
endif
|
||||||
EXTRA_DIST += wolfcrypt/test/test.sln
|
EXTRA_DIST += wolfcrypt/test/test.sln
|
||||||
EXTRA_DIST += wolfcrypt/test/test.vcproj
|
EXTRA_DIST += wolfcrypt/test/test.vcproj
|
||||||
DISTCLEANFILES+= wolfcrypt/test/.libs/testwolfcrypt
|
DISTCLEANFILES+= wolfcrypt/test/.libs/testwolfcrypt
|
||||||
|
@ -7568,5 +7568,8 @@ int pkcs7signed_test(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif /* HAVE_PKCS7 */
|
#endif /* HAVE_PKCS7 */
|
||||||
|
#else
|
||||||
|
#ifndef NO_MAIN_DRIVER
|
||||||
|
int main() { return 0; }
|
||||||
|
#endif
|
||||||
#endif /* NO_CRYPT_TEST */
|
#endif /* NO_CRYPT_TEST */
|
||||||
|
Reference in New Issue
Block a user