diff options
author | MoustaphaSaad <moustapha.saad.abdelhamed@gmail.com> | 2024-05-31 19:14:17 +0300 |
---|---|---|
committer | Theo Buehler <tb@openbsd.org> | 2024-06-19 14:06:09 +0200 |
commit | d34880c232f1a62a153f9ef1b78747d5721f51c3 (patch) | |
tree | 266e8ce29b970d532de6ec44f870cdb2c03718a8 /tests | |
parent | e257aa8b4849e292ebef10c9afccc380e93b152f (diff) | |
download | portable-d34880c232f1a62a153f9ef1b78747d5721f51c3.tar.gz portable-d34880c232f1a62a153f9ef1b78747d5721f51c3.tar.bz2 portable-d34880c232f1a62a153f9ef1b78747d5721f51c3.zip |
fix servertest
changed the servertest.sh to search to .js file as well.
added preload-file link flag to enable access to TEST_SOURCE_DIR
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 3 | ||||
-rwxr-xr-x | tests/servertest.sh | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ead7af9..0da7022 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -644,6 +644,9 @@ add_platform_test(rsa_test rsa_test) | |||
644 | # servertest | 644 | # servertest |
645 | add_executable(servertest servertest.c) | 645 | add_executable(servertest servertest.c) |
646 | target_link_libraries(servertest ${OPENSSL_TEST_LIBS}) | 646 | target_link_libraries(servertest ${OPENSSL_TEST_LIBS}) |
647 | if(EMSCRIPTEN) | ||
648 | set_target_properties(servertest PROPERTIES LINK_FLAGS "--preload-file ${TEST_SOURCE_DIR}") | ||
649 | endif() | ||
647 | if(NOT MSVC) | 650 | if(NOT MSVC) |
648 | add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.sh) | 651 | add_test(NAME servertest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/servertest.sh) |
649 | else() | 652 | else() |
diff --git a/tests/servertest.sh b/tests/servertest.sh index d6497bd..1662332 100755 --- a/tests/servertest.sh +++ b/tests/servertest.sh | |||
@@ -4,6 +4,8 @@ set -e | |||
4 | servertest_bin=./servertest | 4 | servertest_bin=./servertest |
5 | if [ -e ./servertest.exe ]; then | 5 | if [ -e ./servertest.exe ]; then |
6 | servertest_bin=./servertest.exe | 6 | servertest_bin=./servertest.exe |
7 | elif [ -e ./servertest.js ]; then | ||
8 | servertest_bin="node ./servertest.js" | ||
7 | fi | 9 | fi |
8 | 10 | ||
9 | if [ -z $srcdir ]; then | 11 | if [ -z $srcdir ]; then |