diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/CMakeLists.txt | 8 | ||||
-rw-r--r-- | tests/Makefile.am | 6 | ||||
-rwxr-xr-x | tests/dtlstest.sh | 13 |
3 files changed, 27 insertions, 0 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 586f9d3..52acbba 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt | |||
@@ -173,6 +173,14 @@ add_executable(dsatest dsatest.c) | |||
173 | target_link_libraries(dsatest ${OPENSSL_LIBS}) | 173 | target_link_libraries(dsatest ${OPENSSL_LIBS}) |
174 | add_test(dsatest dsatest) | 174 | add_test(dsatest dsatest) |
175 | 175 | ||
176 | # dtlstest | ||
177 | if(NOT WIN32) | ||
178 | add_executable(dtlstest dtlstest.c) | ||
179 | target_link_libraries(dtlstest ${OPENSSL_LIBS}) | ||
180 | add_test(NAME dtlstest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/dtlstest.sh) | ||
181 | set_tests_properties(dtlstest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") | ||
182 | endif() | ||
183 | |||
176 | if(NOT BUILD_SHARED_LIBS) | 184 | if(NOT BUILD_SHARED_LIBS) |
177 | # ec_point_conversion | 185 | # ec_point_conversion |
178 | add_executable(ec_point_conversion ec_point_conversion.c) | 186 | add_executable(ec_point_conversion ec_point_conversion.c) |
diff --git a/tests/Makefile.am b/tests/Makefile.am index 9fac550..8ce338f 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am | |||
@@ -171,6 +171,12 @@ TESTS += dsatest | |||
171 | check_PROGRAMS += dsatest | 171 | check_PROGRAMS += dsatest |
172 | dsatest_SOURCES = dsatest.c | 172 | dsatest_SOURCES = dsatest.c |
173 | 173 | ||
174 | # dtlstest | ||
175 | TESTS += dtlstest.sh | ||
176 | check_PROGRAMS += dtlstest | ||
177 | dtlstest_SOURCES = dtlstest.c | ||
178 | EXTRA_DIST += dtlstest.sh | ||
179 | |||
174 | # ec_point_conversion | 180 | # ec_point_conversion |
175 | TESTS += ec_point_conversion | 181 | TESTS += ec_point_conversion |
176 | check_PROGRAMS += ec_point_conversion | 182 | check_PROGRAMS += ec_point_conversion |
diff --git a/tests/dtlstest.sh b/tests/dtlstest.sh new file mode 100755 index 0000000..ef18cfc --- /dev/null +++ b/tests/dtlstest.sh | |||
@@ -0,0 +1,13 @@ | |||
1 | #!/bin/sh | ||
2 | set -e | ||
3 | |||
4 | dtlstest_bin=./dtlstest | ||
5 | if [ -e ./dtlstest.exe ]; then | ||
6 | dtlstest_bin=./dtlstest.exe | ||
7 | fi | ||
8 | |||
9 | if [ -z $srcdir ]; then | ||
10 | srcdir=. | ||
11 | fi | ||
12 | |||
13 | $dtlstest_bin $srcdir/server.pem $srcdir/server.pem $srcdir/ca.pem | ||