You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by gs...@apache.org on 2013/02/15 14:34:20 UTC

svn commit: r1446578 - /qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark

Author: gsim
Date: Fri Feb 15 13:34:19 2013
New Revision: 1446578

URL: http://svn.apache.org/r1446578
Log:
QPID-4116: Allow the path to qpid-send and qpid-receive programs to be specified; patch from Pavel Moravec.

Modified:
    qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark

Modified: qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark?rev=1446578&r1=1446577&r2=1446578&view=diff
==============================================================================
--- qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark (original)
+++ qpid/trunk/qpid/cpp/src/tests/qpid-cpp-benchmark Fri Feb 15 13:34:19 2013
@@ -18,7 +18,7 @@
 # under the License.
 #
 
-import optparse, time, qpid.messaging, re
+import optparse, time, qpid.messaging, re, os
 from threading import Thread
 from subprocess import Popen, PIPE, STDOUT
 
@@ -77,6 +77,10 @@ op.add_option("--no-delete", default=Fal
               help="Don't delete the test queues.")
 op.add_option("--fill-drain", default=False, action="store_true",
               help="First fill the queues, then drain them")
+op.add_option("--qpid-send-path", default="", type="str", metavar="PATH",
+              help="path to qpid-send binary")
+op.add_option("--qpid-receive-path", default="", type="str", metavar="PATH",
+              help="path to qpid-receive binary")
 
 single_quote_re = re.compile("'")
 def posix_quote(string):
@@ -115,7 +119,7 @@ def start_receive(queue, index, opts, re
     messages = msg_total/opts.receivers;
     if (index < msg_total%opts.receivers): messages += 1
     if (messages == 0): return None
-    command = ["qpid-receive",
+    command = [os.path.join(opts.qpid_receive_path, "qpid-receive"),
                "-b", broker,
                "-a", address,
                "-m", str(messages),
@@ -138,7 +142,7 @@ def start_receive(queue, index, opts, re
 
 def start_send(queue, opts, broker, host):
     address="%s;{%s}"%(queue,",".join(opts.send_option + ["create:always"]))
-    command = ["qpid-send",
+    command = [os.path.join(opts.qpid_send_path, "qpid-send"),
                "-b", broker,
                "-a", address,
                "--messages", str(opts.messages),



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org