diff options
-rw-r--r-- | tests/CMakeLists.txt | 3 | ||||
-rwxr-xr-x | tests/ssltest.sh | 8 |
2 files changed, 10 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 8755bf8..1005dfd 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -739,6 +739,9 @@ add_platform_test(ssl_versions ssl_versions) | |||
739 | # ssltest | 739 | # ssltest |
740 | add_executable(ssltest ssltest.c) | 740 | add_executable(ssltest ssltest.c) |
741 | target_link_libraries(ssltest ${OPENSSL_TEST_LIBS}) | 741 | target_link_libraries(ssltest ${OPENSSL_TEST_LIBS}) |
742 | if(EMSCRIPTEN) | ||
743 | set_target_properties(ssltest PROPERTIES LINK_FLAGS "--preload-file ${TEST_SOURCE_DIR}") | ||
744 | endif() | ||
742 | if(NOT MSVC) | 745 | if(NOT MSVC) |
743 | add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh) | 746 | add_test(NAME ssltest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/ssltest.sh) |
744 | else() | 747 | else() |
diff --git a/tests/ssltest.sh b/tests/ssltest.sh index 22a8936..29ea0b0 100755 --- a/tests/ssltest.sh +++ b/tests/ssltest.sh | |||
@@ -4,17 +4,23 @@ set -e | |||
4 | ssltest_bin=./ssltest | 4 | ssltest_bin=./ssltest |
5 | if [ -e ./ssltest.exe ]; then | 5 | if [ -e ./ssltest.exe ]; then |
6 | ssltest_bin=./ssltest.exe | 6 | ssltest_bin=./ssltest.exe |
7 | elif [ -e ./ssltest.js ]; then | ||
8 | ssltest_bin="node ./ssltest.js" | ||
7 | fi | 9 | fi |
8 | 10 | ||
9 | if [ -d ../apps/openssl ]; then | 11 | if [ -d ../apps/openssl ]; then |
10 | openssl_bin=../apps/openssl/openssl | 12 | openssl_bin=../apps/openssl/openssl |
11 | if [ -e ../apps/openssl/openssl.exe ]; then | 13 | if [ -e ../apps/openssl/openssl.exe ]; then |
12 | openssl_bin=../apps/openssl/openssl.exe | 14 | openssl_bin=../apps/openssl/openssl.exe |
15 | elif [ -e ../apps/openssl/openssl.js ]; then | ||
16 | openssl_bin="node ../apps/openssl/openssl.js" | ||
13 | fi | 17 | fi |
14 | else | 18 | else |
15 | openssl_bin=../apps/openssl | 19 | openssl_bin=../apps/openssl |
16 | if [ -e ../apps/openssl.exe ]; then | 20 | if [ -e ../apps/openssl.exe ]; then |
17 | openssl_bin=../apps/openssl.exe | 21 | openssl_bin=../apps/openssl.exe |
22 | elif [ -e ../apps/openssl.js ]; then | ||
23 | openssl_bin="node ../apps/openssl.js" | ||
18 | fi | 24 | fi |
19 | fi | 25 | fi |
20 | 26 | ||
@@ -24,4 +30,4 @@ fi | |||
24 | 30 | ||
25 | $srcdir/testssl $srcdir/server1-rsa.pem $srcdir/server1-rsa-chain.pem \ | 31 | $srcdir/testssl $srcdir/server1-rsa.pem $srcdir/server1-rsa-chain.pem \ |
26 | $srcdir/ca-root-rsa.pem \ | 32 | $srcdir/ca-root-rsa.pem \ |
27 | $ssltest_bin $openssl_bin | 33 | "$ssltest_bin" "$openssl_bin" |