You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by rh...@apache.org on 2009/08/11 21:47:35 UTC
svn commit: r803263 - /qpid/trunk/qpid/python/qpid-python-test
Author: rhs
Date: Tue Aug 11 19:47:34 2009
New Revision: 803263
URL: http://svn.apache.org/viewvc?rev=803263&view=rev
Log:
added support for specify the modules searched for tests from the command line
Modified:
qpid/trunk/qpid/python/qpid-python-test
Modified: qpid/trunk/qpid/python/qpid-python-test
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/python/qpid-python-test?rev=803263&r1=803262&r2=803263&view=diff
==============================================================================
--- qpid/trunk/qpid/python/qpid-python-test (original)
+++ qpid/trunk/qpid/python/qpid-python-test Tue Aug 11 19:47:34 2009
@@ -51,6 +51,8 @@
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 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 @@
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"])
---------------------------------------------------------------------
Apache Qpid - AMQP Messaging Implementation
Project: http://qpid.apache.org
Use/Interact: mailto:commits-subscribe@qpid.apache.org