diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2014-11-01 20:57:09 -0700 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2014-11-22 02:23:10 +0100 |
commit | ed4c07b34b5571c021684e3df6bf5fc63cde69c5 (patch) | |
tree | 3e578d10a398afeb2485d7dbbe88cfe4805c5c62 | |
parent | 8d8d800a0f8ea3e822ee4d3693058b24307ba4e2 (diff) | |
download | samba-ed4c07b34b5571c021684e3df6bf5fc63cde69c5.tar.gz samba-ed4c07b34b5571c021684e3df6bf5fc63cde69c5.tar.xz samba-ed4c07b34b5571c021684e3df6bf5fc63cde69c5.zip |
subunitrun: Use new samba.tests.subunitrun module.
Change-Id: Ie32f16d72c80c831adfd9a8d32735fa348962123
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
-rwxr-xr-x | source4/scripting/bin/subunitrun | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun index 918195e842..c85fc97fb2 100755 --- a/source4/scripting/bin/subunitrun +++ b/source4/scripting/bin/subunitrun @@ -39,9 +39,8 @@ sys.path.insert(0, "bin/python") import optparse import samba -samba.ensure_external_module("testtools", "testtools") -samba.ensure_external_module("subunit", "subunit/python") -from subunit.run import SubunitTestRunner +from samba.tests.subunitrun import TestProgram + import samba.getopt as options import samba.tests @@ -74,14 +73,6 @@ credopts = options.CredentialsOptions(parser) sambaopts = options.SambaOptions(parser) parser.add_option_group(credopts) parser.add_option_group(sambaopts) -try: - from subunit.run import TestProgram -except ImportError: - from unittest import TestProgram -else: - parser.add_option('-l', '--list', dest='listtests', default=False, - help='List tests rather than running them.', - action="store_true") opts, args = parser.parse_args() @@ -91,5 +82,4 @@ else: lp = sambaopts.get_loadparm() samba.tests.cmdline_credentials = credopts.get_credentials(lp) -runner = SubunitTestRunner() -program = TestProgram(module=None, argv=[sys.argv[0]] + args, testRunner=runner) +TestProgram(module=None, argv=[sys.argv[0]] + args) |