diff options
-rwxr-xr-x | cpp/examples/verify_all | 6 | ||||
-rwxr-xr-x | cpp/src/tests/python_tests | 8 | ||||
-rwxr-xr-x | python/examples/direct/declare_queues.py | 8 | ||||
-rwxr-xr-x | python/examples/direct/direct_consumer.py | 8 | ||||
-rwxr-xr-x | python/examples/direct/direct_producer.py | 8 | ||||
-rwxr-xr-x | python/examples/direct/listener.py | 8 | ||||
-rwxr-xr-x | python/examples/fanout/fanout_consumer.py | 8 | ||||
-rwxr-xr-x | python/examples/fanout/fanout_producer.py | 8 | ||||
-rwxr-xr-x | python/examples/fanout/listener.py | 8 | ||||
-rwxr-xr-x | python/examples/pubsub/topic_publisher.py | 8 | ||||
-rwxr-xr-x | python/examples/pubsub/topic_subscriber.py | 8 | ||||
-rwxr-xr-x | python/examples/request-response/client.py | 8 | ||||
-rwxr-xr-x | python/examples/request-response/server.py | 8 | ||||
-rwxr-xr-x | python/examples/xml-exchange/declare_queues.py | 8 | ||||
-rwxr-xr-x | python/examples/xml-exchange/listener.py | 8 | ||||
-rwxr-xr-x | python/examples/xml-exchange/xml_consumer.py | 8 | ||||
-rwxr-xr-x | python/examples/xml-exchange/xml_producer.py | 8 |
17 files changed, 21 insertions, 113 deletions
diff --git a/cpp/examples/verify_all b/cpp/examples/verify_all index 9db2214903..1e122572ea 100755 --- a/cpp/examples/verify_all +++ b/cpp/examples/verify_all @@ -6,16 +6,14 @@ verify=`dirname $0`/verify topsrcdir=$1 qpidd=$2 exclude_regexp=$3 - -python=$topsrcdir/python +python=${QPID_PYTHON_DIR:-$topsrcdir/python} trap "$qpidd -q" exit export QPID_PORT=`$qpidd -dp0 --data-dir "" --auth no` || { echo "Can't run qpidd" ; exit 1; } export PYTHON_EXAMPLES=$python/examples export PYTHONPATH=$python:$PYTHONPATH -export AMQP_SPEC=$topsrcdir/specs/amqp.0-10.xml -test -d $PYTHON_EXAMPLES || echo "Warning: not verifying python examples, $PYTHON_EXAMPLES not found" +test -d $PYTHON_EXAMPLES || echo "WARNING: No python examples. $PYTHON_EXAMPLES not found." find="find examples" test -d $PYTHON_EXAMPLES && find="$find $PYTHON_EXAMPLES" find="$find -name verify" diff --git a/cpp/src/tests/python_tests b/cpp/src/tests/python_tests index 553c5f4cdb..109d01bd5e 100755 --- a/cpp/src/tests/python_tests +++ b/cpp/src/tests/python_tests @@ -3,7 +3,7 @@ QPID_PORT=${QPID_PORT:-5672} PYTHON_TESTS=${PYTHON_TESTS:-$*} MY_DIR=$(dirname $(which $0)) -PYTHON_DIR=${QPID_PYTHON_DIR:-${MY_DIR}/../../../python} +QPID_PYTHON_DIR=${QPID_PYTHON_DIR:-${MY_DIR}/../../../python} run() { SPEC=$1 @@ -11,9 +11,9 @@ run() { ./run-tests --skip-self-test -v -s $SPEC -I $FAILING -b localhost:$QPID_PORT $PYTHON_TESTS || { echo "FAIL python tests for $SPEC"; exit 1; } } -if test -d ${PYTHON_DIR} ; then - cd ${PYTHON_DIR} +if test -d ${QPID_PYTHON_DIR} ; then + cd ${QPID_PYTHON_DIR} run 0-10-errata cpp_failing_0-10.txt else - echo Warning: python tests not found. + echo "WARNING: No python tests. $QPID_PYTHON_DIR not found." fi diff --git a/python/examples/direct/declare_queues.py b/python/examples/direct/declare_queues.py index deea0a3ccc..ce19a91a60 100755 --- a/python/examples/direct/declare_queues.py +++ b/python/examples/direct/declare_queues.py @@ -26,7 +26,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -39,14 +38,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/direct/direct_consumer.py b/python/examples/direct/direct_consumer.py index f2018bbbb8..0e629b476a 100755 --- a/python/examples/direct/direct_consumer.py +++ b/python/examples/direct/direct_consumer.py @@ -24,7 +24,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -37,14 +36,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/direct/direct_producer.py b/python/examples/direct/direct_producer.py index 8f6a91ba18..bdc668b3c4 100755 --- a/python/examples/direct/direct_producer.py +++ b/python/examples/direct/direct_producer.py @@ -24,7 +24,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -37,14 +36,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/direct/listener.py b/python/examples/direct/listener.py index c18ef47fb7..ee13aae75b 100755 --- a/python/examples/direct/listener.py +++ b/python/examples/direct/listener.py @@ -45,7 +45,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -58,14 +57,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/fanout/fanout_consumer.py b/python/examples/fanout/fanout_consumer.py index 21fc5e8f16..15452390a0 100755 --- a/python/examples/fanout/fanout_consumer.py +++ b/python/examples/fanout/fanout_consumer.py @@ -22,7 +22,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -35,14 +34,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/fanout/fanout_producer.py b/python/examples/fanout/fanout_producer.py index 43d6a94c3d..f5b589c861 100755 --- a/python/examples/fanout/fanout_producer.py +++ b/python/examples/fanout/fanout_producer.py @@ -21,7 +21,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -34,14 +33,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/fanout/listener.py b/python/examples/fanout/listener.py index 50cd06d2a5..56acd50e10 100755 --- a/python/examples/fanout/listener.py +++ b/python/examples/fanout/listener.py @@ -42,7 +42,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -55,14 +54,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/pubsub/topic_publisher.py b/python/examples/pubsub/topic_publisher.py index 64e5a99924..fb817c15f4 100755 --- a/python/examples/pubsub/topic_publisher.py +++ b/python/examples/pubsub/topic_publisher.py @@ -30,7 +30,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -43,14 +42,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/pubsub/topic_subscriber.py b/python/examples/pubsub/topic_subscriber.py index 3c4a8d8d0c..a4210c83ef 100755 --- a/python/examples/pubsub/topic_subscriber.py +++ b/python/examples/pubsub/topic_subscriber.py @@ -54,7 +54,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -67,14 +66,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/request-response/client.py b/python/examples/request-response/client.py index 8ab1149901..7bb4ee3462 100755 --- a/python/examples/request-response/client.py +++ b/python/examples/request-response/client.py @@ -45,7 +45,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -58,14 +57,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/request-response/server.py b/python/examples/request-response/server.py index 7b182723b9..dbe4b88208 100755 --- a/python/examples/request-response/server.py +++ b/python/examples/request-response/server.py @@ -37,7 +37,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -50,13 +49,8 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/xml-exchange/declare_queues.py b/python/examples/xml-exchange/declare_queues.py index d3bf4d359e..8985c20cab 100755 --- a/python/examples/xml-exchange/declare_queues.py +++ b/python/examples/xml-exchange/declare_queues.py @@ -25,7 +25,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -38,14 +37,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/xml-exchange/listener.py b/python/examples/xml-exchange/listener.py index cdc00a7015..f2f9105091 100755 --- a/python/examples/xml-exchange/listener.py +++ b/python/examples/xml-exchange/listener.py @@ -42,7 +42,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -55,14 +54,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/xml-exchange/xml_consumer.py b/python/examples/xml-exchange/xml_consumer.py index c210a4342c..047faec668 100755 --- a/python/examples/xml-exchange/xml_consumer.py +++ b/python/examples/xml-exchange/xml_consumer.py @@ -24,7 +24,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -37,14 +36,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) diff --git a/python/examples/xml-exchange/xml_producer.py b/python/examples/xml-exchange/xml_producer.py index 9e609ed132..435045b0fa 100755 --- a/python/examples/xml-exchange/xml_producer.py +++ b/python/examples/xml-exchange/xml_producer.py @@ -42,7 +42,6 @@ host="127.0.0.1" port=5672 user="guest" password="guest" -amqp_spec="/usr/share/amqp/amqp.0-10.xml" # If an alternate host or port has been specified, use that instead # (this is used in our unit tests) @@ -55,14 +54,9 @@ if len(sys.argv) > 1 : if len(sys.argv) > 2 : port=int(sys.argv[2]) -try: - amqp_spec = os.environ["AMQP_SPEC"] -except KeyError: - amqp_spec="/usr/share/amqp/amqp.0-10.xml" - # Create a connection. socket = connect(host, port) -connection = Connection (sock=socket, spec=qpid.spec.load(amqp_spec)) +connection = Connection (sock=socket) connection.start() session = connection.session(str(uuid4())) |