diff options
author | Ted Ross <tross@apache.org> | 2009-09-03 15:34:19 +0000 |
---|---|---|
committer | Ted Ross <tross@apache.org> | 2009-09-03 15:34:19 +0000 |
commit | c85b4f30bf760f38972fa91a5b9da12434c4e272 (patch) | |
tree | 0e9c5424b0c832ae6e3b5e97b41bd25817bf67aa /cpp | |
parent | cba9a51d7e873db570e4de3c43a32a831afb3ff3 (diff) | |
download | qpid-python-c85b4f30bf760f38972fa91a5b9da12434c4e272.tar.gz |
Improved automake for the qmf bindings.
- Added conditionals for HAVE_PYTHON_DEVEL
- Added conditionals in the run_interop_tests script to skip tests of unbuilt components
- Removed from distribution the code generated by swig for Python
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@810998 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/bindings/qmf/Makefile.am | 10 | ||||
-rw-r--r-- | cpp/bindings/qmf/python/Makefile.am | 3 | ||||
-rw-r--r-- | cpp/bindings/qmf/tests/Makefile.am | 8 | ||||
-rwxr-xr-x | cpp/bindings/qmf/tests/run_interop_tests | 47 |
4 files changed, 43 insertions, 25 deletions
diff --git a/cpp/bindings/qmf/Makefile.am b/cpp/bindings/qmf/Makefile.am index 9637c319f0..eebb4b94de 100644 --- a/cpp/bindings/qmf/Makefile.am +++ b/cpp/bindings/qmf/Makefile.am @@ -18,10 +18,16 @@ # if HAVE_SWIG -if HAVE_RUBY_DEVEL EXTRA_DIST = qmfengine.i -SUBDIRS = ruby python tests +SUBDIRS = tests +if HAVE_RUBY_DEVEL +SUBDIRS += ruby endif + +if HAVE_PYTHON_DEVEL +SUBDIRS += python +endif + endif diff --git a/cpp/bindings/qmf/python/Makefile.am b/cpp/bindings/qmf/python/Makefile.am index e7f5ff53e1..f51d26bfad 100644 --- a/cpp/bindings/qmf/python/Makefile.am +++ b/cpp/bindings/qmf/python/Makefile.am @@ -40,8 +40,7 @@ lib_LTLIBRARIES = _qmfengine.la _qmfengine_la_LDFLAGS = -avoid-version -module -shared _qmfengine_la_LIBADD = $(PYTHON_LIBS) -L$(top_builddir)/src/.libs -lqpidclient $(top_builddir)/src/libqmfagent.la _qmfengine_la_CXXFLAGS = $(INCLUDES) -I$(srcdir)/qmf -I$(PYTHON_INC) -_qmfengine_la_SOURCES = \ - qmfengine.cpp +nodist__qmfengine_la_SOURCES = qmfengine.cpp CLEANFILES = $(generated_file_list) diff --git a/cpp/bindings/qmf/tests/Makefile.am b/cpp/bindings/qmf/tests/Makefile.am index 1ff8a64bed..182771e16b 100644 --- a/cpp/bindings/qmf/tests/Makefile.am +++ b/cpp/bindings/qmf/tests/Makefile.am @@ -18,4 +18,10 @@ # TESTS = run_interop_tests -EXTRA_DIST = run_interop_tests + +EXTRA_DIST = \ + agent_ruby.rb \ + python_agent.py \ + python_console.py \ + ruby_console.rb \ + run_interop_tests diff --git a/cpp/bindings/qmf/tests/run_interop_tests b/cpp/bindings/qmf/tests/run_interop_tests index d0e1662f3b..01d7221ac6 100755 --- a/cpp/bindings/qmf/tests/run_interop_tests +++ b/cpp/bindings/qmf/tests/run_interop_tests @@ -28,6 +28,9 @@ BROKER_DIR=${BUILD_DIR}/src API_DIR=${BUILD_DIR}/bindings/qmf SPEC_DIR=${QPID_DIR}/specs +RUBY_LIB_DIR=${API_DIR}/ruby/.libs +PYTHON_LIB_DIR=${API_DIR}/python/.libs + trap stop_broker INT TERM QUIT start_broker() { @@ -41,7 +44,7 @@ stop_broker() { } start_ruby_agent() { - ruby -I${MY_DIR}/../ruby -I${API_DIR}/ruby/.libs ${MY_DIR}/agent_ruby.rb localhost $BROKER_PORT & + ruby -I${MY_DIR}/../ruby -I${RUBY_LIB_DIR} ${MY_DIR}/agent_ruby.rb localhost $BROKER_PORT & AGENT_PID=$! } @@ -50,7 +53,7 @@ stop_ruby_agent() { } start_python_agent() { - PYTHONPATH="${MY_DIR}/../python:${API_DIR}/python:${API_DIR}/python/.libs" python ${MY_DIR}/python_agent.py localhost $BROKER_PORT & + PYTHONPATH="${MY_DIR}/../python:${API_DIR}/python:${PYTHON_LIB_DIR}" python ${MY_DIR}/python_agent.py localhost $BROKER_PORT & PY_AGENT_PID=$! } @@ -66,26 +69,30 @@ if test -d ${PYTHON_DIR} ; then PYTHONPATH=${PYTHON_DIR}:${MY_DIR} export PYTHONPATH - echo " Python Agent (external storage) vs. Pure-Python Console" - start_python_agent - echo " Python agent started at pid $PY_AGENT_PID" - ${PYTHON_DIR}/qpid-python-test -m python_console -b localhost:$BROKER_PORT $@ - RETCODE=$? - stop_python_agent - if test x$RETCODE != x0; then - echo "FAIL qmf interop tests (Python Agent)"; - TESTS_FAILED=1 + if test -d ${PYTHON_LIB_DIR} ; then + echo " Python Agent (external storage) vs. Pure-Python Console" + start_python_agent + echo " Python agent started at pid $PY_AGENT_PID" + ${PYTHON_DIR}/qpid-python-test -m python_console -b localhost:$BROKER_PORT $@ + RETCODE=$? + stop_python_agent + if test x$RETCODE != x0; then + echo "FAIL qmf interop tests (Python Agent)"; + TESTS_FAILED=1 + fi fi - echo " Ruby Agent (external storage) vs. Pure-Python Console" - start_ruby_agent - echo " Ruby agent started at pid $AGENT_PID" - ${PYTHON_DIR}/qpid-python-test -m python_console -b localhost:$BROKER_PORT $@ - RETCODE=$? - stop_ruby_agent - if test x$RETCODE != x0; then - echo "FAIL qmf interop tests (Ruby Agent)"; - TESTS_FAILED=1 + if test -d ${RUBY_LIB_DIR} ; then + echo " Ruby Agent (external storage) vs. Pure-Python Console" + start_ruby_agent + echo " Ruby agent started at pid $AGENT_PID" + ${PYTHON_DIR}/qpid-python-test -m python_console -b localhost:$BROKER_PORT $@ + RETCODE=$? + stop_ruby_agent + if test x$RETCODE != x0; then + echo "FAIL qmf interop tests (Ruby Agent)"; + TESTS_FAILED=1 + fi fi # Also against the Pure-Python console: |