diff options
author | Andrew Tridgell <tridge@samba.org> | 2011-11-09 13:10:00 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2011-11-10 14:24:21 +1100 |
commit | ac0bba2ea18e2e9ac578a333a3b260951e4c976e (patch) | |
tree | ab76c9dc57f662db1e43c3d76de84b6dafe5f967 /source4/scripting/bin/subunitrun | |
parent | 333248f08c83cc5b18f8e7e84cb19d79a8309d6e (diff) | |
download | samba-ac0bba2ea18e2e9ac578a333a3b260951e4c976e.tar.gz samba-ac0bba2ea18e2e9ac578a333a3b260951e4c976e.tar.bz2 samba-ac0bba2ea18e2e9ac578a333a3b260951e4c976e.zip |
test: added -D option to subunitrun
this allows for:
subunitrun -D lib/ldb/tests/python api
which makes this easier for developers
Diffstat (limited to 'source4/scripting/bin/subunitrun')
-rwxr-xr-x | source4/scripting/bin/subunitrun | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun index 9c87d2eca3..9b3c315d2c 100755 --- a/source4/scripting/bin/subunitrun +++ b/source4/scripting/bin/subunitrun @@ -56,6 +56,8 @@ credopts = options.CredentialsOptions(parser) sambaopts = options.SambaOptions(parser) parser.add_option_group(credopts) parser.add_option_group(sambaopts) +parser.add_option('-D', '--directory', dest='directory', default=None, + help='set test directory') try: from subunit.run import TestProgram except ImportError: @@ -72,5 +74,8 @@ samba.tests.cmdline_credentials = credopts.get_credentials(lp) if getattr(opts, "listtests", False): args.insert(0, "--list") +if opts.directory: + sys.path.append(opts.directory) + runner = SubunitTestRunner() program = TestProgram(module=None, argv=[sys.argv[0]] + args, testRunner=runner) |