summaryrefslogtreecommitdiff
path: root/source4/scripting/bin/subunitrun
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2011-11-14 01:13:36 +0100
committerJelmer Vernooij <jelmer@samba.org>2011-11-14 15:49:36 +0100
commit11a77fe2d7b9ff3edd2e095acff8fdad03b35b50 (patch)
tree7806291e0de784aaa7408e88d44039ad8688fd83 /source4/scripting/bin/subunitrun
parentf625d362d7284c824edeffb58059ecb8114558db (diff)
downloadsamba-11a77fe2d7b9ff3edd2e095acff8fdad03b35b50.tar.gz
samba-11a77fe2d7b9ff3edd2e095acff8fdad03b35b50.tar.bz2
samba-11a77fe2d7b9ff3edd2e095acff8fdad03b35b50.zip
subunitrun: Don't load smb.conf when just listing tests.
Diffstat (limited to 'source4/scripting/bin/subunitrun')
-rwxr-xr-xsource4/scripting/bin/subunitrun9
1 files changed, 5 insertions, 4 deletions
diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun
index dd4290da8b..db8f52fb4a 100755
--- a/source4/scripting/bin/subunitrun
+++ b/source4/scripting/bin/subunitrun
@@ -10,7 +10,7 @@
# get e.g. credentials passed via command-line options to this
# script.
-# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007
+# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007-2011
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -79,10 +79,11 @@ else:
opts, args = parser.parse_args()
-lp = sambaopts.get_loadparm()
-samba.tests.cmdline_credentials = credopts.get_credentials(lp)
-if getattr(opts, "listtests", False):
+if opts.listtests:
args.insert(0, "--list")
+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)