mirror of
https://github.com/samba-team/samba.git
synced 2025-01-10 01:18:15 +03:00
subunitrun: Use new samba.subunit.run module.
Change-Id: I4a4d2237ec9ef090bf95a0ea57285610047451e5 Signed-Off-By: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
This commit is contained in:
parent
3f1ecfd2d0
commit
44a561fa45
@ -35,16 +35,9 @@ import signal
|
|||||||
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
signal.signal(signal.SIGINT, signal.SIG_DFL)
|
||||||
|
|
||||||
import optparse
|
import optparse
|
||||||
import samba
|
|
||||||
import sys
|
import sys
|
||||||
import samba.tests
|
|
||||||
samba.ensure_external_module("subunit", "subunit/python")
|
|
||||||
import subunit.run
|
|
||||||
|
|
||||||
try:
|
from samba.subunit.run import TestProgram as BaseTestProgram
|
||||||
from subunit.run import TestProgram as BaseTestProgram
|
|
||||||
except ImportError:
|
|
||||||
from unittest import TestProgram as BaseTestProgram
|
|
||||||
|
|
||||||
|
|
||||||
class SubunitOptions(optparse.OptionGroup):
|
class SubunitOptions(optparse.OptionGroup):
|
||||||
@ -69,5 +62,4 @@ class TestProgram(BaseTestProgram):
|
|||||||
if getattr(opts, 'load_list', None):
|
if getattr(opts, 'load_list', None):
|
||||||
args.insert(0, "--load-list=%s" % opts.load_list)
|
args.insert(0, "--load-list=%s" % opts.load_list)
|
||||||
argv = [sys.argv[0]] + args
|
argv = [sys.argv[0]] + args
|
||||||
super(TestProgram, self).__init__(module=module, argv=argv,
|
super(TestProgram, self).__init__(module=module, argv=argv)
|
||||||
testRunner=subunit.run.SubunitTestRunner())
|
|
||||||
|
Loading…
Reference in New Issue
Block a user