aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTheo Buehler <tb@openbsd.org>2026-07-18 16:50:47 +0200
committerTheo Buehler <tb@openbsd.org>2026-07-18 16:50:47 +0200
commitce834021c40e39517a2c4ad698c52114e4dac4ba (patch)
treee5c4c02a6a45a79c3bf2f9522dd0baa2e438e132 /tests
parentf3df640db86aa89a5bc3239e3b7c5db90bfc2aa3 (diff)
parentbb72ae26c912e28ea828891ee1a721b831c10d59 (diff)
downloadportable-ce834021c40e39517a2c4ad698c52114e4dac4ba.tar.gz
portable-ce834021c40e39517a2c4ad698c52114e4dac4ba.tar.bz2
portable-ce834021c40e39517a2c4ad698c52114e4dac4ba.zip
Land #1325 - avoid hard dependency on perl
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/Makefile.am3
-rwxr-xr-xtests/x509_verify.sh6
3 files changed, 10 insertions, 3 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index c1f32a4..5aaebd9 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -935,11 +935,11 @@ add_platform_test(valid_handshakes_terminate valid_handshakes_terminate)
935add_executable(x509_verify x509_verify.c) 935add_executable(x509_verify x509_verify.c)
936target_link_libraries(x509_verify ${OPENSSL_TEST_LIBS}) 936target_link_libraries(x509_verify ${OPENSSL_TEST_LIBS})
937add_dependencies(x509_verify openssl) 937add_dependencies(x509_verify openssl)
938if(NOT WIN32 AND NOT EMSCRIPTEN) 938if(NOT WIN32 AND NOT EMSCRIPTEN AND PERL_EXECUTABLE)
939 add_test(NAME x509_verify COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/x509_verify.sh 939 add_test(NAME x509_verify COMMAND ${CMAKE_CURRENT_SOURCE_DIR}/x509_verify.sh
940 $<TARGET_FILE:x509_verify> $<TARGET_FILE:openssl>) 940 $<TARGET_FILE:x509_verify> $<TARGET_FILE:openssl>)
941 set_tests_properties(x509_verify PROPERTIES 941 set_tests_properties(x509_verify PROPERTIES
942 ENVIRONMENT "srcdir=${TEST_SOURCE_DIR}" 942 ENVIRONMENT "srcdir=${TEST_SOURCE_DIR};PERL=${PERL_EXECUTABLE}"
943 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}) 943 WORKING_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR})
944 # This test depends on certificate times that can exceed 32-bit time_t 944 # This test depends on certificate times that can exceed 32-bit time_t
945 # range, so match the existing time tests and expect failure there. 945 # range, so match the existing time tests and expect failure there.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 6373934..96a850f 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -94,6 +94,7 @@ libtest_la_SOURCES = empty.c
94 94
95LDADD = libtest.la $(PLATFORM_LDADD) $(PROG_LDADD) 95LDADD = libtest.la $(PLATFORM_LDADD) $(PROG_LDADD)
96 96
97TESTS_ENVIRONMENT = PERL='$(PERL)'
97TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh 98TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh
98 99
99TESTS = 100TESTS =
@@ -919,6 +920,7 @@ check_PROGRAMS += valid_handshakes_terminate
919valid_handshakes_terminate_SOURCES = valid_handshakes_terminate.c 920valid_handshakes_terminate_SOURCES = valid_handshakes_terminate.c
920 921
921# x509_verify 922# x509_verify
923if HAVE_PERL
922# This test depends on certificate times that can exceed 32-bit time_t 924# This test depends on certificate times that can exceed 32-bit time_t
923# range, so match the existing time tests and expect failure there. 925# range, so match the existing time tests and expect failure there.
924if SMALL_TIME_T 926if SMALL_TIME_T
@@ -926,6 +928,7 @@ XFAIL_TESTS += x509_verify.sh
926endif 928endif
927TESTS += x509_verify.sh 929TESTS += x509_verify.sh
928check_PROGRAMS += x509_verify 930check_PROGRAMS += x509_verify
931endif
929x509_verify_SOURCES = x509_verify.c 932x509_verify_SOURCES = x509_verify.c
930EXTRA_DIST += x509_verify.sh 933EXTRA_DIST += x509_verify.sh
931EXTRA_DIST += make-dir-roots.pl 934EXTRA_DIST += make-dir-roots.pl
diff --git a/tests/x509_verify.sh b/tests/x509_verify.sh
index cc5446c..b43063f 100755
--- a/tests/x509_verify.sh
+++ b/tests/x509_verify.sh
@@ -20,6 +20,10 @@ if [ -z "$srcdir" ]; then
20 srcdir=. 20 srcdir=.
21fi 21fi
22 22
23if [ -z "$PERL" ]; then
24 PERL=perl
25fi
26
23case "$srcdir" in 27case "$srcdir" in
24/*) 28/*)
25 certs_path="$srcdir/certs" 29 certs_path="$srcdir/certs"
@@ -69,7 +73,7 @@ trap cleanup EXIT
69rm -rf "$workdir" 73rm -rf "$workdir"
70mkdir "$workdir" 74mkdir "$workdir"
71 75
72perl "$make_dir_roots" "$certs_path" "$workdir" 76"$PERL" "$make_dir_roots" "$certs_path" "$workdir"
73 77
74( 78(
75 cd "$workdir" 79 cd "$workdir"