1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-07 00:58:40 +03:00

python:tests: Use system ldbdump if we build with system ldb

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
This commit is contained in:
Andreas Schneider 2022-12-22 15:16:04 +01:00 committed by Andreas Schneider
parent 11be7d802d
commit 9ac8dac6db

View File

@ -71,8 +71,12 @@ class DowngradeTestBase(BlackboxTestCase):
def ldbdump_keys_pack_formats(self):
# Get all comments from all partition dbs
comments = []
ldbdump = "ldbdump"
if os.path.exists("bin/ldbdump"):
ldbdump = "bin/ldbdump"
for db in self.dbs:
dump = check_output(["bin/ldbdump", "-i", db])
dump = check_output([ldbdump, "-i", db])
dump = dump.decode("utf-8")
dump = dump.split("\n")
comments += [s for s in dump if s.startswith("#")]