diff options
author | Kamen Mazdrashki <kamenim@samba.org> | 2010-11-18 21:42:26 +0200 |
---|---|---|
committer | Kamen Mazdrashki <kamenim@samba.org> | 2010-11-18 23:11:18 +0100 |
commit | ab379ddd516bf2b77ccf77f542faf6e694ab5d4d (patch) | |
tree | 177cbf38c5da5f79801b56e3d855ca9400555dd6 /source4/lib/ldb/tests | |
parent | 05c0bface19e8dfb395da82de6b889744768f8c6 (diff) | |
download | samba-ab379ddd516bf2b77ccf77f542faf6e694ab5d4d.tar.gz samba-ab379ddd516bf2b77ccf77f542faf6e694ab5d4d.tar.bz2 samba-ab379ddd516bf2b77ccf77f542faf6e694ab5d4d.zip |
s4-ldb.python: Use $SELFTEST_PREFIX/tmp as a temporary directory for testing
This way we won't flood /tmp directory with temp files
Autobuild-User: Kamen Mazdrashki <kamenim@samba.org>
Autobuild-Date: Thu Nov 18 23:11:18 CET 2010 on sn-devel-104
Diffstat (limited to 'source4/lib/ldb/tests')
-rwxr-xr-x | source4/lib/ldb/tests/python/api.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/source4/lib/ldb/tests/python/api.py b/source4/lib/ldb/tests/python/api.py index b5585dcd3d..31d1319631 100755 --- a/source4/lib/ldb/tests/python/api.py +++ b/source4/lib/ldb/tests/python/api.py @@ -9,7 +9,12 @@ import ldb def filename(): - return os.tempnam() + import tempfile + try: + dir_prefix = os.path.join(os.environ["SELFTEST_PREFIX"], "tmp") + except KeyError: + dir_prefix = None + return tempfile.mktemp(dir=dir_prefix) class NoContextTests(unittest.TestCase): |