[PATCH 05/17] Add python paths for extras.
Jelmer Vernooij
jelmer at samba.org
Sat Nov 1 13:21:57 MDT 2014
Change-Id: I3b13239b4c73bc84fdcc3ad1f229d5ebd69e89eb
Signed-Off-By: Jelmer Vernooij <jelmer at samba.org>
---
selftest/filter-subunit | 1 +
selftest/format-subunit | 1 +
selftest/selftesthelpers.py | 8 +++++---
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/selftest/filter-subunit b/selftest/filter-subunit
index 2ed1430..f0528f0 100755
--- a/selftest/filter-subunit
+++ b/selftest/filter-subunit
@@ -25,6 +25,7 @@ import signal
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/subunit/python"))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools"))
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/extras"))
import subunithelper
diff --git a/selftest/format-subunit b/selftest/format-subunit
index b927e95..1b33547 100755
--- a/selftest/format-subunit
+++ b/selftest/format-subunit
@@ -11,6 +11,7 @@ import sys
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/subunit/python"))
sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/testtools"))
+sys.path.insert(0, os.path.join(os.path.dirname(__file__), "../lib/extras"))
import subunithelper
diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py
index 05f8ae3..7729c53 100644
--- a/selftest/selftesthelpers.py
+++ b/selftest/selftesthelpers.py
@@ -68,7 +68,7 @@ else:
python = os.getenv("PYTHON", "python")
# Set a default value, overridden if we find a working one on the system
-tap2subunit = "PYTHONPATH=%s/lib/subunit/python:%s/lib/testtools %s %s/lib/subunit/filters/tap2subunit" % (srcdir(), srcdir(), python, srcdir())
+tap2subunit = "PYTHONPATH=%s/lib/subunit/python:%s/lib/testtools:%s/lib/extras %s %s/lib/subunit/filters/tap2subunit" % (srcdir(), srcdir(), srcdir(), python, srcdir())
sub = subprocess.Popen("tap2subunit", stdin=subprocess.PIPE,
stdout=subprocess.PIPE, stderr=subprocess.PIPE, shell=True)
@@ -172,8 +172,10 @@ def planpythontestsuite(env, module, name=None, extra_path=[]):
name = module
pypath = list(extra_path)
if not has_system_subunit_run:
- pypath.extend(["%s/lib/subunit/python" % srcdir(),
- "%s/lib/testtools" % srcdir()])
+ pypath.extend([
+ "%s/lib/subunit/python" % srcdir(),
+ "%s/lib/testtools" % srcdir(),
+ "%s/lib/extras" % srcdir()])
args = [python, "-m", "subunit.run", "$LISTOPT", module]
if pypath:
args.insert(0, "PYTHONPATH=%s" % ":".join(["$PYTHONPATH"] + pypath))
--
2.1.1
More information about the samba-technical
mailing list