From: Michael Biebl Date: Thu, 16 Dec 2021 18:18:28 +0000 (+0100) Subject: test: record missing openssl as a failure X-Git-Tag: v250-rc3~29 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=85e3a3a832bd9070da000d119e048670318532ef;p=thirdparty%2Fsystemd.git test: record missing openssl as a failure The openssl binary is an optional dependency. If systemd has been built with OpenSSL support, we want to test its OpenSSL functionality. So record a failure message in /failed if the binary is missing. See https://github.com/systemd/systemd/pull/21724#issuecomment-992707614 --- diff --git a/test/units/testsuite-50.sh b/test/units/testsuite-50.sh index 1e8df933495..fa855fafcc0 100755 --- a/test/units/testsuite-50.sh +++ b/test/units/testsuite-50.sh @@ -128,6 +128,13 @@ signature_size="$((signature_size * 2))KiB" HAVE_OPENSSL=0 if systemctl --version | grep -q -- +OPENSSL ; then + # The openssl binary is installed conditionally. + # If we have OpenSSL support enabled and openssl is missing, fail early + # with a proper error message. + if ! command -v openssl >/dev/null 2>&1; then + echo "openssl missing" >/failed + exit 1 + fi HAVE_OPENSSL=1 # Unfortunately OpenSSL insists on reading some config file, hence provide one with mostly placeholder contents cat >> "${image}.openssl.cnf" <