From 28460c3135567f69b2ef2946cf9a0c1dfb940860 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Wed, 15 Jan 2025 11:38:22 +0100 Subject: [PATCH] Improve test for building OpenSSL under macOS MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Mislav Marohnić --- test/build.bats | 57 ++++++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 54 insertions(+), 3 deletions(-) diff --git a/test/build.bats b/test/build.bats index 63d80e8f15..02ca930880 100755 --- a/test/build.bats +++ b/test/build.bats @@ -369,7 +369,7 @@ make install OUT } -@test "install bundled OpenSSL" { +@test "install bundled OpenSSL on Linux" { cached_tarball "openssl-1.1.1w" config cached_tarball "ruby-3.2.0" configure @@ -378,7 +378,7 @@ OUT stub_repeated uname '-s : echo Linux' stub_repeated brew false - stub cc '-xc -E - : echo "OpenSSL 1.0.1a 1 Aug 2023"' + stub cc '-xc -E - : echo "OpenSSL 1.0.1a 1 Aug 2023"' # system_openssl_version stub openssl "version -d : echo 'OPENSSLDIR: \"${TMP}/ssl\"'" stub_make_install "install_sw" stub_make_install @@ -393,7 +393,10 @@ DEF unstub uname unstub brew unstub cc - # unstub openssl + # Depending on certain system certificate files being present under /etc/, + # `openssl version -d` might not have been called, so avoid unstubbing it + # since that would verify the number of invocations. + #unstub openssl unstub make assert_build_log <