From 1ae72df2ca7a0f1a66b7c97f86409ff9761e4f85 Mon Sep 17 00:00:00 2001 From: "Rafael H. Schloming" Date: Tue, 2 Jun 2009 22:19:07 +0000 Subject: 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 --- python/qpid-python-test | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'python/qpid-python-test') 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 -- cgit v1.2.1