From: Douglas Bagnall Date: Sat, 17 Aug 2024 06:09:11 +0000 (+1200) Subject: ldb:tests:repack: use common api_base variables X-Git-Tag: tdb-1.4.13~1169 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b932143c8d56cfc6bbfff47f7db585540378671b;p=thirdparty%2Fsamba.git ldb:tests:repack: use common api_base variables Signed-off-by: Douglas Bagnall Reviewed-by: Andreas Schneider --- diff --git a/lib/ldb/tests/python/repack.py b/lib/ldb/tests/python/repack.py index 0844cd24e58..3a7d18601cb 100644 --- a/lib/ldb/tests/python/repack.py +++ b/lib/ldb/tests/python/repack.py @@ -2,18 +2,14 @@ import os from unittest import TestCase import shutil from subprocess import check_output +import sys +sys.path.insert(0, "bin/python") import ldb -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, + tempdir, +) # Check enabling and disabling GUID indexing works and that the database is @@ -200,5 +196,4 @@ class GUIDIndexAndPackFormatTests(TestCase): if __name__ == '__main__': import unittest - unittest.TestProgram()