summaryrefslogtreecommitdiffstats
path: root/buildtools/wafsamba/samba_utils.py
diff options
context:
space:
mode:
authorPetr Viktorin <pviktori@redhat.com>2015-03-11 17:01:53 +0100
committerPetr Viktorin <pviktori@redhat.com>2015-03-11 17:32:32 +0100
commit34ad28d225771541e3a294bf3782be0839575148 (patch)
tree94c374ab3fb50ca6ca91c3ab4bd95a3ba7f1599a /buildtools/wafsamba/samba_utils.py
parentd479cbfe08b143f65c674a005f2acc9257a30a47 (diff)
downloadsamba-py3compat-34ad28d.tar.gz
samba-py3compat-34ad28d.tar.xz
samba-py3compat-34ad28d.zip
[TMP] Port ldb to Python 3py3compat-34ad28d
Diffstat (limited to 'buildtools/wafsamba/samba_utils.py')
-rw-r--r--buildtools/wafsamba/samba_utils.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/buildtools/wafsamba/samba_utils.py b/buildtools/wafsamba/samba_utils.py
index 4588be9cd9..6cd7c8e048 100644
--- a/buildtools/wafsamba/samba_utils.py
+++ b/buildtools/wafsamba/samba_utils.py
@@ -386,7 +386,7 @@ def RUN_COMMAND(cmd,
return -1
-def RUN_PYTHON_TESTS(testfiles, pythonpath=None):
+def RUN_PYTHON_TESTS(testfiles, pythonpath=None, setup_cmd=None):
env = LOAD_ENVIRONMENT()
if pythonpath is None:
pythonpath = os.path.join(Utils.g_module.blddir, 'python')
@@ -394,6 +394,8 @@ 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 setup_cmd:
+ cmd = '%s ; %s' % (setup_cmd, cmd)
print('Running Python testwith %s: %s' % (interp, testfile))
ret = RUN_COMMAND(cmd)
if ret: