diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-04-14 19:13:41 +0200 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2008-04-14 19:13:41 +0200 |
commit | 1bcbc4afcf2f9984081652c1fbe50d329c86b3b5 (patch) | |
tree | 074fbaf796f82a4bd3fe48488c880f196a915507 /source4/scripting/bin | |
parent | c1d9167fbcc5df9da4f603084ad732915c68c0c0 (diff) | |
download | samba-1bcbc4afcf2f9984081652c1fbe50d329c86b3b5.tar.gz samba-1bcbc4afcf2f9984081652c1fbe50d329c86b3b5.tar.bz2 samba-1bcbc4afcf2f9984081652c1fbe50d329c86b3b5.zip |
Allow command line options in the subunitrun script.
(This used to be commit 524ec0796efebd48e7b5b2eb5fcc92ecc13c0071)
Diffstat (limited to 'source4/scripting/bin')
-rwxr-xr-x | source4/scripting/bin/subunitrun | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun index 11ac426589..3730a15e1b 100755 --- a/source4/scripting/bin/subunitrun +++ b/source4/scripting/bin/subunitrun @@ -20,6 +20,26 @@ from subunit import SubunitTestRunner import sys from unittest import TestProgram +import optparse +import os +import param +import samba.getopt as options +import samba.tests + +parser = optparse.OptionParser("subunitrun [options] <tests>") +credopts = options.CredentialsOptions(parser) +parser.add_option_group(credopts) +sambaopts = options.SambaOptions(parser) +parser.add_option_group(sambaopts) +parser.add_option_group(options.VersionOptions(parser)) + +args = parser.parse_args()[1] + +samba.tests.cmdline_loadparm = sambaopts.get_loadparm() +samba.tests.cmdline_credentials = credopts.get_credentials(samba.tests.cmdline_loadparm) + +import pdb +pdb.set_trace() runner = SubunitTestRunner() -TestProgram(module=None, argv=sys.argv, testRunner=runner) +program = TestProgram(module=None, argv=[sys.argv[0]] + args, testRunner=runner) |