]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
python:tests: Use system ldbdump if we build with system ldb
authorAndreas Schneider <asn@samba.org>
Thu, 22 Dec 2022 14:16:04 +0000 (15:16 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Fri, 23 Dec 2022 14:35:31 +0000 (14:35 +0000)
Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
python/samba/tests/blackbox/downgradedatabase.py

index 8d80ef6e804aadf9d0c4aeed8f9151150bca2d76..e4d772be83ee0982ee8f27624a83cdae4543cdfb 100644 (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("#")]