From: Philipp Gesang Date: Wed, 14 Apr 2021 06:35:40 +0000 (+0200) Subject: allow tests to be run against a PAM-less build X-Git-Tag: tevent-0.11.0~1154 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=8e3b369c0550383499af4b4ebb09513ef0e0635c;p=thirdparty%2Fsamba.git 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 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 Reviewed-by: Douglas Bagnall Reviewed-by: Andrew Bartlett Autobuild-User(master): Andrew Bartlett Autobuild-Date(master): Fri Apr 16 10:27:41 UTC 2021 on sn-devel-184 --- 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: