summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-11-10 20:24:17 +0100
committerJelmer Vernooij <jelmer@samba.org>2011-11-10 23:37:04 +0100
commit8ea8683f72fbd460507b987ca27a859a8a8da3c0 (patch)
tree1c8898139d1e8bd878d267ef61c22c7f27bc7d8b
parenta0ed2da1053a15f2b453556952390968d86fa2f2 (diff)
downloadsamba-8ea8683f72fbd460507b987ca27a859a8a8da3c0.tar.gz
samba-8ea8683f72fbd460507b987ca27a859a8a8da3c0.tar.bz2
samba-8ea8683f72fbd460507b987ca27a859a8a8da3c0.zip
selftest: Allow passing arbitrary number of additional python path values.
-rw-r--r--selftest/selftesthelpers.py6
-rwxr-xr-xsource4/selftest/tests.py2
2 files changed, 3 insertions, 5 deletions
diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py
index c0b5d0d46c..c041c26f35 100644
--- a/selftest/selftesthelpers.py
+++ b/selftest/selftesthelpers.py
@@ -158,13 +158,11 @@ def planperltestsuite(name, path):
skiptestsuite(name, "Test::More not available")
-def planpythontestsuite(env, module, name=None, directory=None):
- pypath = []
+def planpythontestsuite(env, module, name=None, extra_path=[]):
+ pypath = list(extra_path)
if not has_system_subunit_run:
pypath.extend(["%s/lib/subunit/python" % srcdir(),
"%s/lib/testtools" % srcdir()])
- if directory is not None:
- pypath.append(directory)
args = [python, "-m", "subunit.run", "$LISTOPT", module]
if pypath:
args.insert(0, "PYTHONPATH=%s" % ":".join(["$PYTHONPATH"] + pypath]))
diff --git a/source4/selftest/tests.py b/source4/selftest/tests.py
index f2e7df4ed3..d25f0ddca8 100755
--- a/source4/selftest/tests.py
+++ b/source4/selftest/tests.py
@@ -395,7 +395,7 @@ def plansambapythontestsuite(name, env, path, module, environ={}, extra_args=[])
args += extra_args
plantestsuite(name, env, args)
-planpythontestsuite("api", "none", name="ldb.python", directory='lib/ldb/tests/python')
+planpythontestsuite("api", "none", name="ldb.python", extra_path=['lib/ldb/tests/python'])
planpythontestsuite("none", "samba.tests.credentials")
plantestsuite_idlist("samba.tests.gensec", "dc:local", [subunitrun, "$LISTOPT", '-U"$USERNAME%$PASSWORD"', "samba.tests.gensec"])
planpythontestsuite("none", "samba.tests.registry")