summaryrefslogtreecommitdiff
path: root/python/qpid-python-test
diff options
context:
space:
mode:
authorRafael H. Schloming <rhs@apache.org>2009-06-02 22:19:07 +0000
committerRafael H. Schloming <rhs@apache.org>2009-06-02 22:19:07 +0000
commit1ae72df2ca7a0f1a66b7c97f86409ff9761e4f85 (patch)
treeb91df8a686d19b05004987495d3499d32cc6183b /python/qpid-python-test
parent75cd78bc5af13d6ddddd07cc1ff7f36d0807eed4 (diff)
downloadqpid-python-1ae72df2ca7a0f1a66b7c97f86409ff9761e4f85.tar.gz
added defines to the test harness and made the delay used by the tests configurable
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@781187 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'python/qpid-python-test')
-rwxr-xr-xpython/qpid-python-test12
1 files changed, 11 insertions, 1 deletions
diff --git a/python/qpid-python-test b/python/qpid-python-test
index 8d56311dbe..bdad3f3688 100755
--- a/python/qpid-python-test
+++ b/python/qpid-python-test
@@ -53,12 +53,14 @@ parser.add_option("-i", "--ignore", action="append", default=[],
parser.add_option("-I", "--ignore-file", metavar="IFILE", action="append",
default=[],
help="ignore tests matching patterns in IFILE")
+parser.add_option("-D", "--define", metavar="DEFINE", dest="defines",
+ action="append", default=[], help="define test parameters")
class Config:
def __init__(self):
self.broker = URL("localhost")
- self.work = None
+ self.defines = {}
self.log_file = None
self.log_level = WARN
self.log_categories = []
@@ -70,6 +72,14 @@ excludes = ["*__*__"]
config = Config()
list_only = opts.list
config.broker = URL(opts.broker)
+for d in opts.defines:
+ try:
+ idx = d.index("=")
+ name = d[:idx]
+ value = d[idx+1:]
+ config.defines[name] = value
+ except ValueError:
+ config.defines[d] = None
config.log_file = opts.log_file
config.log_level = levels[opts.log_level.upper()]
config.log_categories = opts.log_categories