diff options
| author | Theo Buehler <tb@openbsd.org> | 2026-07-18 16:50:47 +0200 |
|---|---|---|
| committer | Theo Buehler <tb@openbsd.org> | 2026-07-18 16:50:47 +0200 |
| commit | ce834021c40e39517a2c4ad698c52114e4dac4ba (patch) | |
| tree | e5c4c02a6a45a79c3bf2f9522dd0baa2e438e132 /tests | |
| parent | f3df640db86aa89a5bc3239e3b7c5db90bfc2aa3 (diff) | |
| parent | bb72ae26c912e28ea828891ee1a721b831c10d59 (diff) | |
| download | portable-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.txt | 4 | ||||
| -rw-r--r-- | tests/Makefile.am | 3 | ||||
| -rwxr-xr-x | tests/x509_verify.sh | 6 |
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) | |||
| 935 | add_executable(x509_verify x509_verify.c) | 935 | add_executable(x509_verify x509_verify.c) |
| 936 | target_link_libraries(x509_verify ${OPENSSL_TEST_LIBS}) | 936 | target_link_libraries(x509_verify ${OPENSSL_TEST_LIBS}) |
| 937 | add_dependencies(x509_verify openssl) | 937 | add_dependencies(x509_verify openssl) |
| 938 | if(NOT WIN32 AND NOT EMSCRIPTEN) | 938 | if(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 | ||
| 95 | LDADD = libtest.la $(PLATFORM_LDADD) $(PROG_LDADD) | 95 | LDADD = libtest.la $(PLATFORM_LDADD) $(PROG_LDADD) |
| 96 | 96 | ||
| 97 | TESTS_ENVIRONMENT = PERL='$(PERL)' | ||
| 97 | TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh | 98 | TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/tap-driver.sh |
| 98 | 99 | ||
| 99 | TESTS = | 100 | TESTS = |
| @@ -919,6 +920,7 @@ check_PROGRAMS += valid_handshakes_terminate | |||
| 919 | valid_handshakes_terminate_SOURCES = valid_handshakes_terminate.c | 920 | valid_handshakes_terminate_SOURCES = valid_handshakes_terminate.c |
| 920 | 921 | ||
| 921 | # x509_verify | 922 | # x509_verify |
| 923 | if 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. |
| 924 | if SMALL_TIME_T | 926 | if SMALL_TIME_T |
| @@ -926,6 +928,7 @@ XFAIL_TESTS += x509_verify.sh | |||
| 926 | endif | 928 | endif |
| 927 | TESTS += x509_verify.sh | 929 | TESTS += x509_verify.sh |
| 928 | check_PROGRAMS += x509_verify | 930 | check_PROGRAMS += x509_verify |
| 931 | endif | ||
| 929 | x509_verify_SOURCES = x509_verify.c | 932 | x509_verify_SOURCES = x509_verify.c |
| 930 | EXTRA_DIST += x509_verify.sh | 933 | EXTRA_DIST += x509_verify.sh |
| 931 | EXTRA_DIST += make-dir-roots.pl | 934 | EXTRA_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=. |
| 21 | fi | 21 | fi |
| 22 | 22 | ||
| 23 | if [ -z "$PERL" ]; then | ||
| 24 | PERL=perl | ||
| 25 | fi | ||
| 26 | |||
| 23 | case "$srcdir" in | 27 | case "$srcdir" in |
| 24 | /*) | 28 | /*) |
| 25 | certs_path="$srcdir/certs" | 29 | certs_path="$srcdir/certs" |
| @@ -69,7 +73,7 @@ trap cleanup EXIT | |||
| 69 | rm -rf "$workdir" | 73 | rm -rf "$workdir" |
| 70 | mkdir "$workdir" | 74 | mkdir "$workdir" |
| 71 | 75 | ||
| 72 | perl "$make_dir_roots" "$certs_path" "$workdir" | 76 | "$PERL" "$make_dir_roots" "$certs_path" "$workdir" |
| 73 | 77 | ||
| 74 | ( | 78 | ( |
| 75 | cd "$workdir" | 79 | cd "$workdir" |
