1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-03 13:47:25 +03:00

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
This commit is contained in:
Philipp Gesang 2021-04-14 08:35:40 +02:00 committed by Andrew Bartlett
parent 8ff6ad7454
commit 8e3b369c05

View File

@ -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: