From de60dfd38967d64392c2a902473bd1966371a21a Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 11 Dec 2014 01:16:38 +0000 Subject: Use samba.subunit.run to run subunit tests. Change-Id: Id9bdd33b7ac5e4db40ab8bef4dbe0f04c36d8da7 Signed-off-by: Jelmer Vernooij Reviewed-by: Andrew Bartlett --- selftest/selftesthelpers.py | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'selftest/selftesthelpers.py') diff --git a/selftest/selftesthelpers.py b/selftest/selftesthelpers.py index 6e387ec9dd3..3c1e6badef3 100644 --- a/selftest/selftesthelpers.py +++ b/selftest/selftesthelpers.py @@ -58,13 +58,6 @@ if subprocess.call(perl + ["-e", "eval require Test::More;"]) == 0: else: has_perl_test_more = False -try: - from subunit.run import TestProgram -except ImportError: - has_system_subunit_run = False -else: - has_system_subunit_run = True - python = os.getenv("PYTHON", "python") # Set a default value, overridden if we find a working one on the system @@ -166,13 +159,7 @@ def planpythontestsuite(env, module, name=None, extra_path=[]): if name is None: name = module pypath = list(extra_path) - if not has_system_subunit_run: - pypath.extend([ - "%s/lib/subunit/python" % srcdir(), - "%s/lib/testtools" % srcdir(), - "%s/lib/extras" % srcdir(), - "%s/lib/mimeparse" % srcdir()]) - args = [python, "-m", "subunit.run", "$LISTOPT", "$LOADLIST", module] + args = [python, "-m", "samba.subunit.run", "$LISTOPT", "$LOADLIST", module] if pypath: args.insert(0, "PYTHONPATH=%s" % ":".join(["$PYTHONPATH"] + pypath)) plantestsuite_loadlist(name, env, args) -- cgit v1.2.1