aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt8
-rw-r--r--tests/Makefile.am6
-rwxr-xr-xtests/dtlstest.sh13
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)
173target_link_libraries(dsatest ${OPENSSL_LIBS}) 173target_link_libraries(dsatest ${OPENSSL_LIBS})
174add_test(dsatest dsatest) 174add_test(dsatest dsatest)
175 175
176# dtlstest
177if(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}")
182endif()
183
176if(NOT BUILD_SHARED_LIBS) 184if(NOT BUILD_SHARED_LIBS)
177# ec_point_conversion 185# ec_point_conversion
178add_executable(ec_point_conversion ec_point_conversion.c) 186add_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
171check_PROGRAMS += dsatest 171check_PROGRAMS += dsatest
172dsatest_SOURCES = dsatest.c 172dsatest_SOURCES = dsatest.c
173 173
174# dtlstest
175TESTS += dtlstest.sh
176check_PROGRAMS += dtlstest
177dtlstest_SOURCES = dtlstest.c
178EXTRA_DIST += dtlstest.sh
179
174# ec_point_conversion 180# ec_point_conversion
175TESTS += ec_point_conversion 181TESTS += ec_point_conversion
176check_PROGRAMS += ec_point_conversion 182check_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
2set -e
3
4dtlstest_bin=./dtlstest
5if [ -e ./dtlstest.exe ]; then
6 dtlstest_bin=./dtlstest.exe
7fi
8
9if [ -z $srcdir ]; then
10 srcdir=.
11fi
12
13$dtlstest_bin $srcdir/server.pem $srcdir/server.pem $srcdir/ca.pem