From 08b1cfaf7193bed57ff4dcf929059cfd79b51e4e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mislav=20Marohni=C4=87?= Date: Tue, 17 Oct 2023 12:00:45 +0200 Subject: [PATCH] Add `needs_openssl` test --- test/build.bats | 61 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 60 insertions(+), 1 deletion(-) diff --git a/test/build.bats b/test/build.bats index 2ab941b7c2..cc176b55df 100755 --- a/test/build.bats +++ b/test/build.bats @@ -83,7 +83,7 @@ OUT stub_make_install() { stub "$MAKE" \ " : echo \"$MAKE \$(inspect_args \"\$@\")\" >> build.log" \ - "install : echo \"$MAKE \$(inspect_args \"\$@\")\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'" + "install* : echo \"$MAKE \$(inspect_args \"\$@\")\" >> build.log && cat build.log >> '$INSTALL_ROOT/build.log'" } assert_build_log() { @@ -316,6 +316,65 @@ make install OUT } +@test "install bundled OpenSSL" { + cached_tarball "openssl-1.1.1w" config + cached_tarball "ruby-2.0.0" configure + + mkdir -p "${TMP}/ssl/certs" + touch "${TMP}/ssl/cert.pem" + + stub_repeated uname '-s : echo Linux' + stub_repeated brew false + stub cc '-xc -E - : echo "OpenSSL 1.0.1a 1 Aug 2023"' + stub openssl "version -d : echo 'OPENSSLDIR: \"${TMP}/ssl\"'" + stub_make_install + stub_make_install + + mkdir -p "$INSTALL_ROOT"/openssl/ssl # OPENSSLDIR + run_inline_definition <