Skip to content

Commit

Permalink
Add RNP_TESTS_OPENSSL_ROOT env variable to correctly check in tests w…
Browse files Browse the repository at this point in the history
…hich OpenSSL lib RNP is linked to.
  • Loading branch information
ni4 committed Jan 8, 2024
1 parent adceb29 commit 1ece1dc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
6 changes: 6 additions & 0 deletions src/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,12 @@ function(add_cli_test suite)
"RNP_TESTS_GPG_PATH=${GPG_EXECUTABLE}"
"RNP_TESTS_GPGCONF_PATH=${GPGCONF_EXECUTABLE}"
)
if (CRYPTO_BACKEND_OPENSSL)
list(APPEND _env
"RNP_TESTS_OPENSSL_ROOT=${OPENSSL_ROOT_DIR}"
)
endif()

set_tests_properties(${_test_name} PROPERTIES
TIMEOUT 3000
FIXTURES_REQUIRED testdata
Expand Down
2 changes: 1 addition & 1 deletion src/tests/cli_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -3140,7 +3140,7 @@ def test_backend_version(self):
if not match:
match = re.match(OPENSSL_BACKEND_VERSION, out)
backend_prog = 'openssl'
openssl_root = os.getenv('OPENSSL_ROOT_DIR')
openssl_root = os.getenv('RNP_TESTS_OPENSSL_ROOT')
else:
openssl_root = None
self.assertTrue(match)
Expand Down

0 comments on commit 1ece1dc

Please sign in to comment.