diff options
author | Rafael H. Schloming <rhs@apache.org> | 2009-08-11 19:47:34 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2009-08-11 19:47:34 +0000 |
commit | 04213eae5ea065238c99495fe19ac109857f4c1f (patch) | |
tree | b3da49aec0d5f45ab6ebca40890c3ff30b89d724 /qpid/python/qpid-python-test | |
parent | 386650d00cadaf2bcf3c1c70f8c2452bd3add93b (diff) | |
download | qpid-python-04213eae5ea065238c99495fe19ac109857f4c1f.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@803263 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/qpid-python-test')
-rwxr-xr-x | qpid/python/qpid-python-test | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/qpid/python/qpid-python-test b/qpid/python/qpid-python-test index b9e69c782e..68f9622710 100755 --- a/qpid/python/qpid-python-test +++ b/qpid/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"]) |