From ed9359727a502d5ec5162e4017f76ffccf6aaa79 Mon Sep 17 00:00:00 2001 From: Brent Cook Date: Mon, 29 Aug 2022 08:42:43 -0500 Subject: build updates for latest upstream --- tests/CMakeLists.txt | 11 +++++++++++ tests/Makefile.am | 6 ++++++ tests/quictest.bat | 14 ++++++++++++++ tests/quictest.sh | 13 +++++++++++++ 4 files changed, 44 insertions(+) create mode 100644 tests/quictest.bat create mode 100755 tests/quictest.sh (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index eb1b79c..7e80c97 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -413,6 +413,17 @@ else() endif() set_tests_properties(pq_test PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") +# quictest +set(QUICTEST_SRC quictest.c) +add_executable(quictest ${QUICTEST_SRC}) +target_link_libraries(quictest ${OPENSSL_TEST_LIBS}) +if(NOT MSVC) + add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.sh) +else() + add_test(NAME quictest COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/quictest.bat $) +endif() +set_tests_properties(quictest PROPERTIES ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}") + # randtest add_executable(randtest randtest.c) target_link_libraries(randtest ${OPENSSL_TEST_LIBS}) diff --git a/tests/Makefile.am b/tests/Makefile.am index 79f10fb..2a48a2b 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am @@ -425,6 +425,12 @@ pq_test_SOURCES = pq_test.c EXTRA_DIST += pq_test.sh pq_test.bat EXTRA_DIST += pq_expected.txt +# quictest +TESTS += quictest.sh +check_PROGRAMS += quictest +quictest_SOURCES = quictest.c +EXTRA_DIST += quictest.sh quictest.bat + # randtest TESTS += randtest check_PROGRAMS += randtest diff --git a/tests/quictest.bat b/tests/quictest.bat new file mode 100644 index 0000000..cfbf2cd --- /dev/null +++ b/tests/quictest.bat @@ -0,0 +1,14 @@ +@echo off +setlocal enabledelayedexpansion +REM quictest.bat + +set quictest_bin=%1 +set quictest_bin=%quictest_bin:/=\% +if not exist %quictest_bin% exit /b 1 + +%quictest_bin% %srcdir%\server.pem %srcdir%\server.pem %srcdir%\ca.pem +if !errorlevel! neq 0 ( + exit /b 1 +) + +endlocal diff --git a/tests/quictest.sh b/tests/quictest.sh new file mode 100755 index 0000000..cc1982f --- /dev/null +++ b/tests/quictest.sh @@ -0,0 +1,13 @@ +#!/bin/sh +set -e + +quictest_bin=./quictest +if [ -e ./quictest.exe ]; then + quictest_bin=./quictest.exe +fi + +if [ -z $srcdir ]; then + srcdir=. +fi + +$quictest_bin $srcdir/server.pem $srcdir/server.pem $srcdir/ca.pem -- cgit v1.2.3-55-g6feb