diff options
author | Philipp Gesang <philipp.gesang@intra2net.com> | 2021-04-14 08:35:40 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2021-04-16 10:27:41 +0000 |
commit | 8e3b369c0550383499af4b4ebb09513ef0e0635c (patch) | |
tree | 9555e6759da0cf50a0cfa1731c1edc08623baef1 /selftest | |
parent | 8ff6ad7454d9da1dff91c8b827c54008e83cc150 (diff) | |
download | samba-8e3b369c0550383499af4b4ebb09513ef0e0635c.tar.gz |
allow tests to be run against a PAM-less build
Indexing the config hash table fails for PAM related values:
Traceback (most recent call last):
File "/src/samba/samba/selftest/tests.py", line 49, in <module>
pam_set_items_so_path = config_hash["PAM_SET_ITEMS_SO_PATH"]
KeyError: 'PAM_SET_ITEMS_SO_PATH'
Error creating recipe from python3 /src/samba/samba/selftest/tests.py| at /src/samba/samba/selftest/selftest.pl line 645.
which prevents the test suite from running when built
--without-pam. Access those values using the get() method
instead.
Signed-off-by: Philipp Gesang <philipp.gesang@intra2net.com>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Fri Apr 16 10:27:41 UTC 2021 on sn-devel-184
Diffstat (limited to 'selftest')
-rw-r--r-- | selftest/tests.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/selftest/tests.py b/selftest/tests.py index 9685a744d0d..69a833dc1ff 100644 --- a/selftest/tests.py +++ b/selftest/tests.py @@ -45,8 +45,8 @@ finally: have_man_pages_support = ("XSLTPROC_MANPAGES" in config_hash) with_pam = ("WITH_PAM" in config_hash) with_elasticsearch_backend = ("HAVE_SPOTLIGHT_BACKEND_ES" in config_hash) -pam_wrapper_so_path = config_hash["LIBPAM_WRAPPER_SO_PATH"] -pam_set_items_so_path = config_hash["PAM_SET_ITEMS_SO_PATH"] +pam_wrapper_so_path = config_hash.get("LIBPAM_WRAPPER_SO_PATH") +pam_set_items_so_path = config_hash.get("PAM_SET_ITEMS_SO_PATH") planpythontestsuite("none", "samba.tests.source") if have_man_pages_support: |