From d0448b509bf3b0f555902e09820934c7d8150106 Mon Sep 17 00:00:00 2001 From: Alan Conway Date: Tue, 2 Aug 2011 19:43:09 +0000 Subject: NO-JIRA: Minor improvements to test scripts. allhosts: added -X option for running X clients. qpid-cpp-benchmark: accept comma or space-separated lists for --client-host and --broker. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1153256 13f79535-47bb-0310-9956-ffa450edef68 --- cpp/src/tests/allhosts | 4 +++- cpp/src/tests/qpid-cpp-benchmark | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) (limited to 'cpp/src') diff --git a/cpp/src/tests/allhosts b/cpp/src/tests/allhosts index e43571aed4..4b4b943156 100755 --- a/cpp/src/tests/allhosts +++ b/cpp/src/tests/allhosts @@ -29,11 +29,12 @@ Options: -s SECONDS sleep between starting commands. -q don't print banner lines for each host. -o SUFFIX log output of each command to .SUFFIX + -X passed to ssh - forward X connection. " exit 1 } -while getopts "tl:bs:dqo:" opt; do +while getopts "tl:bs:dqo:X" opt; do case $opt in l) SSHOPTS="-l$OPTARG $SSHOPTS" ;; t) SSHOPTS="-t $SSHOPTS" ;; @@ -42,6 +43,7 @@ while getopts "tl:bs:dqo:" opt; do s) SLEEP="sleep $OPTARG" ;; q) NOBANNER=1 ;; o) SUFFIX=$OPTARG ;; + X) SSHOPTS="-X $SSHOPTS" ;; *) usage;; esac done diff --git a/cpp/src/tests/qpid-cpp-benchmark b/cpp/src/tests/qpid-cpp-benchmark index 6138108558..300d34774f 100755 --- a/cpp/src/tests/qpid-cpp-benchmark +++ b/cpp/src/tests/qpid-cpp-benchmark @@ -215,7 +215,8 @@ class ReadyReceiver: raise Exception("Receiver error: %s"%(out)) raise Exception("Timed out waiting for receivers to be ready") -def flatten(l): return sum(map(lambda s: s.split(","), l),[]) +def flatten(l): + return sum(map(lambda s: re.split(re.compile("\s*,\s*|\s+"), s), l), []) class RoundRobin: def __init__(self,items): -- cgit v1.2.1