Fix use of OPENSSL in SSL tests if command is not found
authorMichael Paquier <[email protected]>
Wed, 8 Nov 2023 08:29:02 +0000 (17:29 +0900)
committerMichael Paquier <[email protected]>
Wed, 8 Nov 2023 08:29:02 +0000 (17:29 +0900)
`openssl` is an optional dependency in the meson build as it may not be
installed in an environment even if SSL libraries are around.  The meson
scripts assume that, but the SSL tests thought that it was a hard
dependency, causing a meson installation to fail if `openssl` could not
be found.  Like similar tests that depend on external commands, and to
be consistent with ./configure for the SSL tests, this commit makes the
command existence optional in the tests.

Author: Tristan Partin
Discussion: https://postgr.es/m/[email protected]
Back-through: 16

src/test/ssl/meson.build

index 4cda81f3bc27e73ba3b6c4093ccd1f2494956492..abb30ab214f8d41a09842085f676557f735ae1c7 100644 (file)
@@ -7,7 +7,7 @@ tests += {
   'tap': {
     'env': {
       'with_ssl': ssl_library,
-      'OPENSSL': openssl.path(),
+      'OPENSSL': openssl.found() ? openssl.path() : '',
     },
     'tests': [
       't/001_ssltests.pl',