diff options
author | MoustaphaSaad <moustapha.saad.abdelhamed@gmail.com> | 2024-05-31 19:09:42 +0300 |
---|---|---|
committer | Theo Buehler <tb@openbsd.org> | 2024-06-19 14:06:09 +0200 |
commit | e257aa8b4849e292ebef10c9afccc380e93b152f (patch) | |
tree | 305fe8514b8d291c1b48f2efb71c846084f6d679 /tests | |
parent | 46bcf38a5841ab32ce9a87ff9ef3df86bcaf8cab (diff) | |
download | portable-e257aa8b4849e292ebef10c9afccc380e93b152f.tar.gz portable-e257aa8b4849e292ebef10c9afccc380e93b152f.tar.bz2 portable-e257aa8b4849e292ebef10c9afccc380e93b152f.zip |
fix quictest
changed the quictest.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/quictest.sh | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 82e5ad3..ead7af9 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -576,6 +576,9 @@ set_tests_properties(pq_test PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | |||
576 | set(QUICTEST_SRC quictest.c) | 576 | set(QUICTEST_SRC quictest.c) |
577 | add_executable(quictest ${QUICTEST_SRC}) | 577 | add_executable(quictest ${QUICTEST_SRC}) |
578 | target_link_libraries(quictest ${OPENSSL_TEST_LIBS}) | 578 | target_link_libraries(quictest ${OPENSSL_TEST_LIBS}) |
579 | if(EMSCRIPTEN) | ||
580 | set_target_properties(quictest PROPERTIES LINK_FLAGS "--preload-file ${TEST_SOURCE_DIR}") | ||
581 | endif() | ||
579 | if(NOT MSVC) | 582 | if(NOT MSVC) |
580 | add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.sh) | 583 | add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.sh) |
581 | else() | 584 | else() |
diff --git a/tests/quictest.sh b/tests/quictest.sh index 0184179..23561ad 100755 --- a/tests/quictest.sh +++ b/tests/quictest.sh | |||
@@ -4,6 +4,8 @@ set -e | |||
4 | quictest_bin=./quictest | 4 | quictest_bin=./quictest |
5 | if [ -e ./quictest.exe ]; then | 5 | if [ -e ./quictest.exe ]; then |
6 | quictest_bin=./quictest.exe | 6 | quictest_bin=./quictest.exe |
7 | elif [ -e ./quictest.js ]; then | ||
8 | quictest_bin="node ./quictest.js" | ||
7 | fi | 9 | fi |
8 | 10 | ||
9 | if [ -z $srcdir ]; then | 11 | if [ -z $srcdir ]; then |