summaryrefslogtreecommitdiff
path: root/source4/scripting/bin
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2011-11-09 13:10:00 +1100
committerAndrew Tridgell <tridge@samba.org>2011-11-10 14:24:21 +1100
commitac0bba2ea18e2e9ac578a333a3b260951e4c976e (patch)
treeab76c9dc57f662db1e43c3d76de84b6dafe5f967 /source4/scripting/bin
parent333248f08c83cc5b18f8e7e84cb19d79a8309d6e (diff)
downloadsamba-ac0bba2ea18e2e9ac578a333a3b260951e4c976e.tar.gz
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')
-rwxr-xr-xsource4/scripting/bin/subunitrun5
1 files changed, 5 insertions, 0 deletions
diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun
index 9c87d2eca3d..9b3c315d2cf 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)