diff options
| author | Gordon Sim <gsim@apache.org> | 2014-07-16 10:19:38 +0000 |
|---|---|---|
| committer | Gordon Sim <gsim@apache.org> | 2014-07-16 10:19:38 +0000 |
| commit | 5fdc04af328d0a8a7e8a9ca50383faa44f184e4a (patch) | |
| tree | 63f94c248c63e2739e6b1eadde2e7ac25413965d /qpid/cpp | |
| parent | c2e9cb0f73de96b620c61c4109ab136a96764a82 (diff) | |
| download | qpid-python-5fdc04af328d0a8a7e8a9ca50383faa44f184e4a.tar.gz | |
QPID-5887: allow qpid-txtest2 to be run by make test
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1610959 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/cpp')
| -rw-r--r-- | qpid/cpp/src/tests/CMakeLists.txt | 1 | ||||
| -rw-r--r-- | qpid/cpp/src/tests/qpid-txtest2.cpp | 16 | ||||
| -rwxr-xr-x | qpid/cpp/src/tests/quick_txtest | 1 |
3 files changed, 16 insertions, 2 deletions
diff --git a/qpid/cpp/src/tests/CMakeLists.txt b/qpid/cpp/src/tests/CMakeLists.txt index b314b966f5..08a8c69d69 100644 --- a/qpid/cpp/src/tests/CMakeLists.txt +++ b/qpid/cpp/src/tests/CMakeLists.txt @@ -352,6 +352,7 @@ add_test (qpid-client-test ${test_wrap} --start-broker -- ${qpid-client-test_LOC add_test (quick_perftest ${test_wrap} --start-broker -- ${qpid-perftest_LOCATION} --summary --count 100) add_test (quick_topictest ${test_wrap} --start-broker -- ${CMAKE_CURRENT_SOURCE_DIR}/quick_topictest${test_script_suffix}) add_test (quick_txtest ${test_wrap} --start-broker -- ${qpid-txtest_LOCATION} --queues 4 --tx-count 10 --quiet) +add_test (quick_txtest2 ${test_wrap} --start-broker -- ${qpid-txtest2_LOCATION} --queues 4 --tx-count 10 --quiet) add_test (msg_group_tests ${test_wrap} --start-broker -- ${CMAKE_CURRENT_SOURCE_DIR}/run_msg_group_tests${test_script_suffix}) add_test (run_header_test ${test_wrap} --start-broker -- ${CMAKE_CURRENT_SOURCE_DIR}/run_header_test${test_script_suffix}) add_test (python_tests ${test_wrap} --start-broker -- ${CMAKE_CURRENT_SOURCE_DIR}/python_tests${test_script_suffix}) diff --git a/qpid/cpp/src/tests/qpid-txtest2.cpp b/qpid/cpp/src/tests/qpid-txtest2.cpp index 6502d1521c..e9fa4282d4 100644 --- a/qpid/cpp/src/tests/qpid-txtest2.cpp +++ b/qpid/cpp/src/tests/qpid-txtest2.cpp @@ -61,12 +61,13 @@ struct Options : public qpid::Options { std::string url; std::string connectionOptions; qpid::log::Options log; + uint port; bool quiet; Options() : help(false), init(true), transfer(true), check(true), size(256), durable(true), queues(2), base("tx-test2"), msgsPerTx(1), txCount(5), totalMsgCount(10), - capacity(1000), url("localhost"), quiet(false) + capacity(1000), url("localhost"), port(0), quiet(false) { addOptions() ("init", qpid::optValue(init, "yes|no"), "Declare queues and populate one with the initial set of messages.") @@ -82,6 +83,7 @@ struct Options : public qpid::Options { ("capacity", qpid::optValue(capacity, "N"), "Pre-fetch window (0 implies no pre-fetch)") ("broker,b", qpid::optValue(url, "URL"), "url of broker to connect to") ("connection-options", qpid::optValue(connectionOptions, "OPTIONS"), "options for the connection") + ("port,p", qpid::optValue(port, "PORT"), "(for test compatibility only, use broker option instead)") ("quiet", qpid::optValue(quiet), "reduce output from test") ("help", qpid::optValue(help), "print this usage statement"); add(log); @@ -90,6 +92,18 @@ struct Options : public qpid::Options { { try { qpid::Options::parse(argc, argv); + if (port) { + if (url == "localhost") { + std::stringstream u; + u << url << ":" << port; + url = u.str(); + } else { + std::cerr << *this << std::endl << std::endl + << "--port and --broker should not be specified together; specify full url in --broker option" << std::endl; + return false; + } + + } qpid::log::Logger::instance().configure(log); if (help) { std::cout << *this << std::endl << std::endl diff --git a/qpid/cpp/src/tests/quick_txtest b/qpid/cpp/src/tests/quick_txtest index 95cd4bfd18..77e8556f1d 100755 --- a/qpid/cpp/src/tests/quick_txtest +++ b/qpid/cpp/src/tests/quick_txtest @@ -20,4 +20,3 @@ # exec `dirname $0`/run_test ./qpid-txtest --queues 4 --tx-count 10 --quiet -exec `dirname $0`/run_test ./qpid-txtest2 --queues 4 --tx-count 10 --quiet |
