]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
ldb:tests:index: use abi_base
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sat, 17 Aug 2024 06:13:00 +0000 (18:13 +1200)
committerAndreas Schneider <asn@cryptomilk.org>
Tue, 24 Sep 2024 09:14:38 +0000 (09:14 +0000)
Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andreas Schneider <asn@samba.org>
lib/ldb/tests/python/index.py

index c1da76d67e2facaec72033163e96052b9625072a..15c3bbb2483de6c6c2bade77cd250f8555414c5e 100755 (executable)
@@ -27,21 +27,15 @@ ldb behaves correctly in those circumstances.
 import os
 from unittest import TestCase
 import sys
+sys.path.insert(0, "bin/python")
 import ldb
 import shutil
 
-
-TDB_PREFIX = "tdb://"
-MDB_PREFIX = "mdb://"
-
-
-def tempdir():
-    import tempfile
-    try:
-        dir_prefix = os.path.join(os.environ["SELFTEST_PREFIX"], "tmp")
-    except KeyError:
-        dir_prefix = None
-    return tempfile.mkdtemp(dir=dir_prefix)
+from api_base import (
+    TDB_PREFIX,
+    MDB_PREFIX,
+    tempdir,
+)
 
 
 def contains(result, dn):