diff options
author | John Thacker <johnthacker@gmail.com> | 2021-02-18 12:53:12 -0500 |
---|---|---|
committer | AndersBroman <a.broman58@gmail.com> | 2021-02-20 15:07:49 +0000 |
commit | ddd8f0ab61c5266b6970373c2f731a4cc2da85bd (patch) | |
tree | b3f56fdaf7f4eef59d9a211e94f07b5d82f68bbd /test | |
parent | 1f595c435c1476a24e2b443a768185ac2503087a (diff) |
tests: Look for softhsm2 in more places
Fedora and RHEL/CentOS put libsofthsm2.so in a different location
than Debian/Ubuntu, so look there too. This causes test_tls_pkcs11
to pass instead of being skipped (if softhsm2 and the other
prerequisites are installed.)
Diffstat (limited to 'test')
-rw-r--r-- | test/suite_decryption.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/suite_decryption.py b/test/suite_decryption.py index 66e65ae76d..5f0adfaae7 100644 --- a/test/suite_decryption.py +++ b/test/suite_decryption.py @@ -1162,12 +1162,12 @@ def softhsm_paths(features): else: name = 'softhsm2.dll' else: - # Debian/Ubuntu-specific paths + # Look in a variety of paths, Debian/Ubuntu, Fedora, RHEL/CentOS madir = sysconfig.get_config_var('multiarchsubdir') - libdir64_sub = os.path.join(libdir + '64', 'softhsm') - libdir_sub = os.path.join(libdir, 'softhsm') + libdir_archs = (libdir, libdir + '64') + libdir_subs = ('softhsm', 'pkcs11', '') libdirs = [os.path.join(libdir + madir, 'softhsm')] if madir else [] - libdirs += [libdir_sub, libdir64_sub] + libdirs += [os.path.join(arch, sub) for sub in libdir_subs for arch in libdir_archs] name = 'libsofthsm2.so' for libdir in libdirs: provider = os.path.join(libdir, name) |