summaryrefslogtreecommitdiff
path: root/buildtools
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-06-08 14:17:12 +0200
committerStefan Metzmacher <metze@samba.org>2015-11-05 18:04:23 +0100
commitc54fc3f2b6479a5c48d801626fb01f68da6894c7 (patch)
tree3569d769e0a7c434c350192c7bc2d741b0ebb715 /buildtools
parent9884a8fa58ffc8ddff0977c069aedda3beb6415f (diff)
downloadsamba-c54fc3f2b6479a5c48d801626fb01f68da6894c7.tar.gz
ldb: Run the Python testsuite
Signed-off-by: Petr Viktorin <pviktori@redhat.com> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org>
Diffstat (limited to 'buildtools')
-rw-r--r--buildtools/wafsamba/samba_utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 36d3929f549..fb1355c768e 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -385,7 +385,7 @@ def RUN_COMMAND(cmd,
return -1
-def RUN_PYTHON_TESTS(testfiles, pythonpath=None):
+def RUN_PYTHON_TESTS(testfiles, pythonpath=None, extra_env=None):
env = LOAD_ENVIRONMENT()
if pythonpath is None:
pythonpath = os.path.join(Utils.g_module.blddir, 'python')
@@ -393,6 +393,9 @@ def RUN_PYTHON_TESTS(testfiles, pythonpath=None):
for interp in env.python_interpreters:
for testfile in testfiles:
cmd = "PYTHONPATH=%s %s %s" % (pythonpath, interp, testfile)
+ if extra_env:
+ for key, value in extra_env.items():
+ cmd = "%s=%s %s" % (key, value, cmd)
print('Running Python test with %s: %s' % (interp, testfile))
ret = RUN_COMMAND(cmd)
if ret: