tdb: setup TEST_DATA_PREFIX for make test
authorStefan Metzmacher <metze@samba.org>
Mon, 27 Dec 2010 11:20:47 +0000 (12:20 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 27 Dec 2010 14:37:57 +0000 (15:37 +0100)
metze

lib/tdb/wscript

index 37b9b5b8e000d536d5b4386fff87ce5542717cf6..8146a98608161e83b22d208351e4c1bc68a25fa3 100644 (file)
@@ -115,7 +115,11 @@ def build(bld):
 
 def test(ctx):
     '''run tdb 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 = os.path.join(Utils.g_module.blddir, 'tdbtorture')
     ret = samba_utils.RUN_COMMAND(cmd)
     print("testsuite returned %d" % ret)