execute tests that require srcdir environment variable with cmake
- uncomment procedures for aeadtest, evptest, pq_test, ssltest, testdsa and testrsa - add set_tests_properties() for setting environment variable srcdir - tweak openssl path in ssltest.sh, testdsa.sh, testenc.sh and testrsa.sh
This commit is contained in:
parent
8131b377bf
commit
cf45f2bdfd
@ -12,11 +12,10 @@ include_directories(
|
|||||||
set(ENV{srcdir} ${CMAKE_CURRENT_SOURCE_DIR})
|
set(ENV{srcdir} ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
|
|
||||||
# aeadtest
|
# aeadtest
|
||||||
#add_executable(aeadtest aeadtest.c)
|
add_executable(aeadtest aeadtest.c)
|
||||||
#target_link_libraries(aeadtest ${OPENSSL_LIBS})
|
target_link_libraries(aeadtest ${OPENSSL_LIBS})
|
||||||
#add_test(aeadtest aeadtest.sh)
|
add_test(aeadtest ${CMAKE_CURRENT_SOURCE_DIR}/aeadtest.sh)
|
||||||
#configure_file(aeadtests.txt aeadtests.txt COPYONLY)
|
set_tests_properties(aeadtest PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
#configure_file(aeadtest.sh aeadtest.sh COPYONLY)
|
|
||||||
|
|
||||||
# aes_wrap
|
# aes_wrap
|
||||||
add_executable(aes_wrap aes_wrap.c)
|
add_executable(aes_wrap aes_wrap.c)
|
||||||
@ -127,9 +126,10 @@ target_link_libraries(enginetest ${OPENSSL_LIBS})
|
|||||||
add_test(enginetest enginetest)
|
add_test(enginetest enginetest)
|
||||||
|
|
||||||
# evptest
|
# evptest
|
||||||
#add_executable(evptest evptest.c)
|
add_executable(evptest evptest.c)
|
||||||
#target_link_libraries(evptest ${OPENSSL_LIBS})
|
target_link_libraries(evptest ${OPENSSL_LIBS})
|
||||||
#add_test(evptest ${CMAKE_CURRENT_SOURCE_DIR}/evptest.sh)
|
add_test(evptest ${CMAKE_CURRENT_SOURCE_DIR}/evptest.sh)
|
||||||
|
set_tests_properties(evptest PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|
||||||
# explicit_bzero
|
# explicit_bzero
|
||||||
# explicit_bzero relies on SA_ONSTACK, which is unavailable on Windows
|
# explicit_bzero relies on SA_ONSTACK, which is unavailable on Windows
|
||||||
@ -208,9 +208,10 @@ target_link_libraries(poly1305test ${OPENSSL_LIBS})
|
|||||||
add_test(poly1305test poly1305test)
|
add_test(poly1305test poly1305test)
|
||||||
|
|
||||||
# pq_test
|
# pq_test
|
||||||
#add_executable(pq_test pq_test.c)
|
add_executable(pq_test pq_test.c)
|
||||||
#target_link_libraries(pq_test ${OPENSSL_LIBS})
|
target_link_libraries(pq_test ${OPENSSL_LIBS})
|
||||||
#add_test(pq_test ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.sh)
|
add_test(pq_test ${CMAKE_CURRENT_SOURCE_DIR}/pq_test.sh)
|
||||||
|
set_tests_properties(pq_test PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|
||||||
# randtest
|
# randtest
|
||||||
add_executable(randtest randtest.c)
|
add_executable(randtest randtest.c)
|
||||||
@ -253,18 +254,22 @@ target_link_libraries(sha512test ${OPENSSL_LIBS})
|
|||||||
add_test(sha512test sha512test)
|
add_test(sha512test sha512test)
|
||||||
|
|
||||||
# ssltest
|
# ssltest
|
||||||
#add_executable(ssltest ssltest.c)
|
add_executable(ssltest ssltest.c)
|
||||||
#target_link_libraries(ssltest ${OPENSSL_LIBS})
|
target_link_libraries(ssltest ${OPENSSL_LIBS})
|
||||||
#add_test(ssltest ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh)
|
add_test(ssltest ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh)
|
||||||
|
set_tests_properties(ssltest PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|
||||||
# testdsa
|
# testdsa
|
||||||
#add_test(testdsa ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.sh)
|
add_test(testdsa ${CMAKE_CURRENT_SOURCE_DIR}/testdsa.sh)
|
||||||
|
set_tests_properties(testdsa PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|
||||||
# testenc
|
# testenc
|
||||||
add_test(testenc ${CMAKE_CURRENT_SOURCE_DIR}/testenc.sh)
|
add_test(testenc ${CMAKE_CURRENT_SOURCE_DIR}/testenc.sh)
|
||||||
|
set_tests_properties(testenc PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|
||||||
# testrsa
|
# testrsa
|
||||||
#add_test(testrsa ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.sh)
|
add_test(testrsa ${CMAKE_CURRENT_SOURCE_DIR}/testrsa.sh)
|
||||||
|
set_tests_properties(testrsa PROPERTIES ENVIRONMENT "srcdir=${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
|
|
||||||
# timingsafe
|
# timingsafe
|
||||||
add_executable(timingsafe timingsafe.c)
|
add_executable(timingsafe timingsafe.c)
|
||||||
|
@ -6,9 +6,16 @@ if [ -e ./ssltest.exe ]; then
|
|||||||
ssltest_bin=./ssltest.exe
|
ssltest_bin=./ssltest.exe
|
||||||
fi
|
fi
|
||||||
|
|
||||||
openssl_bin=../apps/openssl/openssl
|
if [ -d ../apps/openssl ]; then
|
||||||
if [ -e ../apps/openssl/openssl.exe ]; then
|
openssl_bin=../apps/openssl/openssl
|
||||||
|
if [ -e ../apps/openssl/openssl.exe ]; then
|
||||||
openssl_bin=../apps/openssl/openssl.exe
|
openssl_bin=../apps/openssl/openssl.exe
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
openssl_bin=../apps/openssl
|
||||||
|
if [ -e ../apps/openssl.exe ]; then
|
||||||
|
openssl_bin=../apps/openssl.exe
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $srcdir ]; then
|
if [ -z $srcdir ]; then
|
||||||
|
@ -4,9 +4,16 @@
|
|||||||
|
|
||||||
#Test DSA certificate generation of openssl
|
#Test DSA certificate generation of openssl
|
||||||
|
|
||||||
cmd=../apps/openssl/openssl
|
if [ -d ../apps/openssl ]; then
|
||||||
if [ -e ../apps/openssl/openssl.exe ]; then
|
cmd=../apps/openssl/openssl
|
||||||
|
if [ -e ../apps/openssl/openssl.exe ]; then
|
||||||
cmd=../apps/openssl/openssl.exe
|
cmd=../apps/openssl/openssl.exe
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cmd=../apps/openssl
|
||||||
|
if [ -e ../apps/openssl.exe ]; then
|
||||||
|
cmd=../apps/openssl.exe
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $srcdir ]; then
|
if [ -z $srcdir ]; then
|
||||||
|
@ -2,12 +2,23 @@
|
|||||||
# $OpenBSD: testenc.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $
|
# $OpenBSD: testenc.sh,v 1.1 2014/08/26 17:50:07 jsing Exp $
|
||||||
|
|
||||||
test=p
|
test=p
|
||||||
cmd=../apps/openssl/openssl
|
if [ -d ../apps/openssl ]; then
|
||||||
if [ -e ../apps/openssl/openssl.exe ]; then
|
cmd=../apps/openssl/openssl
|
||||||
|
if [ -e ../apps/openssl/openssl.exe ]; then
|
||||||
cmd=../apps/openssl/openssl.exe
|
cmd=../apps/openssl/openssl.exe
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cmd=../apps/openssl
|
||||||
|
if [ -e ../apps/openssl.exe ]; then
|
||||||
|
cmd=../apps/openssl.exe
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cat openssl.cnf >$test;
|
if [ -z $srcdir ]; then
|
||||||
|
srcdir=.
|
||||||
|
fi
|
||||||
|
|
||||||
|
cat $srcdir/openssl.cnf >$test;
|
||||||
|
|
||||||
echo cat
|
echo cat
|
||||||
$cmd enc < $test > $test.cipher
|
$cmd enc < $test > $test.cipher
|
||||||
|
@ -4,9 +4,16 @@
|
|||||||
|
|
||||||
#Test RSA certificate generation of openssl
|
#Test RSA certificate generation of openssl
|
||||||
|
|
||||||
cmd=../apps/openssl/openssl
|
if [ -d ../apps/openssl ]; then
|
||||||
if [ -e ../apps/openssl/openssl.exe ]; then
|
cmd=../apps/openssl/openssl
|
||||||
|
if [ -e ../apps/openssl/openssl.exe ]; then
|
||||||
cmd=../apps/openssl/openssl.exe
|
cmd=../apps/openssl/openssl.exe
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
cmd=../apps/openssl
|
||||||
|
if [ -e ../apps/openssl.exe ]; then
|
||||||
|
cmd=../apps/openssl.exe
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z $srcdir ]; then
|
if [ -z $srcdir ]; then
|
||||||
|
Loading…
Reference in New Issue
Block a user