diff options
author | MoustaphaSaad <moustapha.saad.abdelhamed@gmail.com> | 2024-05-31 19:18:51 +0300 |
---|---|---|
committer | Theo Buehler <tb@openbsd.org> | 2024-06-19 14:06:09 +0200 |
commit | 08664de74c39da767736a35480f9e4dc8af54131 (patch) | |
tree | ff666a69dd9c1f32b7b92193cd171add44c3a2c0 | |
parent | d34880c232f1a62a153f9ef1b78747d5721f51c3 (diff) | |
download | portable-08664de74c39da767736a35480f9e4dc8af54131.tar.gz portable-08664de74c39da767736a35480f9e4dc8af54131.tar.bz2 portable-08664de74c39da767736a35480f9e4dc8af54131.zip |
fix shutdowntest
changed the shutdowntest.sh to search to .js file as well.
added preload-file link flag to enable access to TEST_SOURCE_DIR
-rw-r--r-- | tests/CMakeLists.txt | 3 | ||||
-rwxr-xr-x | tests/shutdowntest.sh | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0da7022..12d4308 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -663,6 +663,9 @@ add_platform_test(sha_test sha_test) | |||
663 | set(SHUTDOWNTEST_SRC shutdowntest.c) | 663 | set(SHUTDOWNTEST_SRC shutdowntest.c) |
664 | add_executable(shutdowntest ${SHUTDOWNTEST_SRC}) | 664 | add_executable(shutdowntest ${SHUTDOWNTEST_SRC}) |
665 | target_link_libraries(shutdowntest ${OPENSSL_TEST_LIBS}) | 665 | target_link_libraries(shutdowntest ${OPENSSL_TEST_LIBS}) |
666 | if(EMSCRIPTEN) | ||
667 | set_target_properties(shutdowntest PROPERTIES LINK_FLAGS "--preload-file ${TEST_SOURCE_DIR}") | ||
668 | endif() | ||
666 | if(NOT MSVC) | 669 | if(NOT MSVC) |
667 | add_test(NAME shutdowntest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/shutdowntest.sh) | 670 | add_test(NAME shutdowntest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/shutdowntest.sh) |
668 | else() | 671 | else() |
diff --git a/tests/shutdowntest.sh b/tests/shutdowntest.sh index d4aec1c..d3ae472 100755 --- a/tests/shutdowntest.sh +++ b/tests/shutdowntest.sh | |||
@@ -4,6 +4,8 @@ set -e | |||
4 | shutdowntest_bin=./shutdowntest | 4 | shutdowntest_bin=./shutdowntest |
5 | if [ -e ./shutdowntest.exe ]; then | 5 | if [ -e ./shutdowntest.exe ]; then |
6 | shutdowntest_bin=./shutdowntest.exe | 6 | shutdowntest_bin=./shutdowntest.exe |
7 | elif [ -e ./shutdowntest.js ]; then | ||
8 | shutdowntest_bin="node ./shutdowntest.js" | ||
7 | fi | 9 | fi |
8 | 10 | ||
9 | if [ -z $srcdir ]; then | 11 | if [ -z $srcdir ]; then |