summaryrefslogtreecommitdiffstats
path: root/python/samba/tests/subunitrun.py
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2014-11-01 21:17:39 -0700
committerJelmer Vernooij <jelmer@samba.org>2014-11-22 02:23:10 +0100
commitee281c61d01b5fb167571b8ace5e739758100db6 (patch)
tree1fe8b2d09a5432619400205c25505917f8da80fe /python/samba/tests/subunitrun.py
parent24035a6b3ed5ffdb1e75ebd375c3f7c2129742ff (diff)
downloadsamba-ee281c61d01b5fb167571b8ace5e739758100db6.tar.gz
samba-ee281c61d01b5fb167571b8ace5e739758100db6.tar.xz
samba-ee281c61d01b5fb167571b8ace5e739758100db6.zip
Move option handling into samba.tests.subunitrun.
Change-Id: I65a73b74854af636413f4f284147f3bcf28b6f82 Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python/samba/tests/subunitrun.py')
-rw-r--r--python/samba/tests/subunitrun.py11
1 files changed, 8 insertions, 3 deletions
diff --git a/python/samba/tests/subunitrun.py b/python/samba/tests/subunitrun.py
index abb98813db..d45467607e 100644
--- a/python/samba/tests/subunitrun.py
+++ b/python/samba/tests/subunitrun.py
@@ -63,8 +63,13 @@ class SubunitOptions(optparse.OptionGroup):
class TestProgram(BaseTestProgram):
- def __init__(self, module=None, argv=None):
- if argv is None:
- argv = [sys.argv[0]]
+ def __init__(self, module=None, args=None, opts=None):
+ if args is None:
+ args = []
+ if getattr(opts, "listtests", False):
+ args.insert(0, "--list")
+ if getattr(opts, 'load_list', None):
+ args.insert(0, "--load-list=%s" % opts.load_list)
+ argv = [sys.argv[0]] + args
super(TestProgram, self).__init__(module=module, argv=argv,
testRunner=subunit.run.SubunitTestRunner())