s4:ldb: setup TEST_DATA_PREFIX for make test
authorStefan Metzmacher <metze@samba.org>
Mon, 27 Dec 2010 11:29:07 +0000 (12:29 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 27 Dec 2010 14:37:58 +0000 (15:37 +0100)
metze

source4/lib/ldb/wscript

index 97b7cc1ed44c974e5a88ee6758284d4cd5418096..a7e93f6f47a41499ff87bebfc50d2c2447448e57 100644 (file)
@@ -241,7 +241,11 @@ def build(bld):
 
 def test(ctx):
     '''run ldb testsuite'''
-    import Utils, samba_utils
+    import Utils, samba_utils, shutil
+    test_prefix = "%s/st" % (Utils.g_module.blddir)
+    shutil.rmtree(test_prefix, ignore_errors=True)
+    os.makedirs(test_prefix)
+    os.putenv('TEST_DATA_PREFIX', test_prefix)
     cmd = 'tests/test-tdb.sh'
     ret = samba_utils.RUN_COMMAND(cmd)
     print("testsuite returned %d" % ret)