summaryrefslogtreecommitdiff
path: root/python/qpid-python-test
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-08-11 19:47:34 +0000
committerRafael H. Schloming <rhs@apache.org>2009-08-11 19:47:34 +0000
commita2d7a54a947b03b7a424cec56f24ccdde144dce9 (patch)
tree06e8c7ec4fb75ee7d1f0b3bd62e7c58fdec86241 /python/qpid-python-test
parent28d901ce0c8d45e9bcc8ca67f7e7f5c6fbf70948 (diff)
downloadqpid-python-a2d7a54a947b03b7a424cec56f24ccdde144dce9.tar.gz
added support for specify the modules searched for tests from the command line
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@803263 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid-python-test')
-rwxr-xr-xpython/qpid-python-test10
1 files changed, 8 insertions, 2 deletions
diff --git a/python/qpid-python-test b/python/qpid-python-test
index b9e69c782e..68f9622710 100755
--- a/python/qpid-python-test
+++ b/python/qpid-python-test
@@ -51,6 +51,8 @@ parser.add_option("-v", "--log-level", metavar="LEVEL", default="WARN",
parser.add_option("-c", "--log-category", metavar="CATEGORY", action="append",
dest="log_categories", default=[],
help="log only categories matching CATEGORY pattern")
+parser.add_option("-m", "--module", action="append", default=[],
+ dest="modules", help="add module to test search path")
parser.add_option("-i", "--ignore", action="append", default=[],
help="ignore tests matching IGNORE pattern")
parser.add_option("-I", "--ignore-file", metavar="IFILE", action="append",
@@ -101,8 +103,10 @@ for v in opts.ignore_file:
for a in args:
includes.append(a.strip())
-if not includes:
+if not includes and not opts.modules:
includes.extend(["qpid.tests.*", "tests.*", "tests_0-10.*"])
+else:
+ includes.append("*")
def is_ignored(path):
for p in excludes:
@@ -493,7 +497,9 @@ class Harness:
objects.append(child)
self.scanned.append(obj)
-modules = "qpid.tests", "tests", "tests_0-8", "tests_0-9", "tests_0-10"
+modules = opts.modules
+if not modules:
+ modules.extend(["qpid.tests", "tests", "tests_0-8", "tests_0-9", "tests_0-10"])
h = Harness()
for name in modules:
m = __import__(name, None, None, ["dummy"])