summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2010-04-01 14:47:54 +0200
committerJelmer Vernooij <jelmer@samba.org>2010-04-01 14:47:54 +0200
commit132e505d1edc501edbe73bb75b65c1f5a724e70b (patch)
tree204630d4e284cdae009833d728812b03b59ff1e9
parenta2411c5708b47c3c2d53c34c6dbed7e1c2eab717 (diff)
downloadsamba-132e505d1edc501edbe73bb75b65c1f5a724e70b.tar.gz
samba-132e505d1edc501edbe73bb75b65c1f5a724e70b.tar.bz2
samba-132e505d1edc501edbe73bb75b65c1f5a724e70b.zip
subunitrun: Find testtools and subunit when they're not provided by the
system.
-rwxr-xr-xsource4/scripting/bin/subunitrun8
1 files changed, 5 insertions, 3 deletions
diff --git a/source4/scripting/bin/subunitrun b/source4/scripting/bin/subunitrun
index 63afdc7009..7b9f20efa7 100755
--- a/source4/scripting/bin/subunitrun
+++ b/source4/scripting/bin/subunitrun
@@ -22,14 +22,16 @@ import sys
# Find right directory when running from source tree
sys.path.insert(0, "bin/python")
-from subunit.run import SubunitTestRunner
from unittest import TestProgram
import optparse
-import os
-from samba import param
+import samba
+samba.ensure_external_module("testtools", "testtools")
+samba.ensure_external_module("subunit", "subunit/python")
import samba.getopt as options
import samba.tests
+from subunit.run import SubunitTestRunner
+
parser = optparse.OptionParser("subunitrun [options] <tests>")
credopts = options.CredentialsOptions(parser)
parser.add_option_group(credopts)