From 11a77fe2d7b9ff3edd2e095acff8fdad03b35b50 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Mon, 14 Nov 2011 01:13:36 +0100 Subject: [PATCH] subunitrun: Don't load smb.conf when just listing tests. --- source4/scripting/bin/subunitrun | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun index dd4290da8b84..db8f52fb4a55 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 2007 +# Copyright (C) Jelmer Vernooij 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) -- 2.34.1