diff options
author | Rafael H. Schloming <rhs@apache.org> | 2009-06-02 22:19:07 +0000 |
---|---|---|
committer | Rafael H. Schloming <rhs@apache.org> | 2009-06-02 22:19:07 +0000 |
commit | 1ae72df2ca7a0f1a66b7c97f86409ff9761e4f85 (patch) | |
tree | b91df8a686d19b05004987495d3499d32cc6183b /python/qpid-python-test | |
parent | 75cd78bc5af13d6ddddd07cc1ff7f36d0807eed4 (diff) | |
download | qpid-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-x | python/qpid-python-test | 12 |
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 |