You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by as...@apache.org on 2014/09/30 20:17:07 UTC

svn commit: r1628509 - /qpid/proton/trunk/proton-c/CMakeLists.txt

Author: astitcher
Date: Tue Sep 30 18:17:07 2014
New Revision: 1628509

URL: http://svn.apache.org/r1628509
Log:
NO-JIRA: If we didn't build the python bindings then we can't run python tests

Modified:
    qpid/proton/trunk/proton-c/CMakeLists.txt

Modified: qpid/proton/trunk/proton-c/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/CMakeLists.txt?rev=1628509&r1=1628508&r2=1628509&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/CMakeLists.txt Tue Sep 30 18:17:07 2014
@@ -484,21 +484,23 @@ mark_as_advanced (VALGRIND_EXE)
 add_subdirectory(src/tests)
 
 # python test: tests/python/proton-test
-set (py_root "${pn_test_root}/python")
-set (py_src "${CMAKE_CURRENT_SOURCE_DIR}/bindings/python")
-set (py_bin "${CMAKE_CURRENT_BINARY_DIR}/bindings/python")
-set (py_bld "${CMAKE_CURRENT_BINARY_DIR}${bld_suffix}") # For windows
-set (app_path "${pn_test_bin}/tools/apps/c${bld_suffix}")
-set (app_path "${app_path}:${pn_test_root}/tools/apps/python")
-set_path (py_path "${py_bin}:${py_bld}:${app_path}:$ENV{PATH}")
-set_path (py_pythonpath "${py_root}:${py_src}:${py_bin}:${py_bld}|$ENV{PYTHONPATH}")
-if (CMAKE_SYSTEM_NAME STREQUAL Windows)
-  set_path (py_pythonpath "${py_bin}${bld_suffix}:${py_pythonpath}")
-endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
-add_test (python-test ${PYTHON_EXECUTABLE} ${env_py}
-         "PATH=${py_path}" "PYTHONPATH=${py_pythonpath}" ${VALGRIND_ENV}
-         ${PYTHON_EXECUTABLE} "${py_root}/proton-test")
-set_tests_properties(python-test PROPERTIES PASS_REGULAR_EXPRESSION "Totals: .* 0 failed")
+if (BUILD_PYTHON)
+  set (py_root "${pn_test_root}/python")
+  set (py_src "${CMAKE_CURRENT_SOURCE_DIR}/bindings/python")
+  set (py_bin "${CMAKE_CURRENT_BINARY_DIR}/bindings/python")
+  set (py_bld "${CMAKE_CURRENT_BINARY_DIR}${bld_suffix}") # For windows
+  set (app_path "${pn_test_bin}/tools/apps/c${bld_suffix}")
+  set (app_path "${app_path}:${pn_test_root}/tools/apps/python")
+  set_path (py_path "${py_bin}:${py_bld}:${app_path}:$ENV{PATH}")
+  set_path (py_pythonpath "${py_root}:${py_src}:${py_bin}:${py_bld}|$ENV{PYTHONPATH}")
+  if (CMAKE_SYSTEM_NAME STREQUAL Windows)
+    set_path (py_pythonpath "${py_bin}${bld_suffix}:${py_pythonpath}")
+  endif (CMAKE_SYSTEM_NAME STREQUAL Windows)
+  add_test (python-test ${PYTHON_EXECUTABLE} ${env_py}
+            "PATH=${py_path}" "PYTHONPATH=${py_pythonpath}" ${VALGRIND_ENV}
+            ${PYTHON_EXECUTABLE} "${py_root}/proton-test")
+  set_tests_properties(python-test PROPERTIES PASS_REGULAR_EXPRESSION "Totals: .* 0 failed")
+endif (BUILD_PYTHON)
 
 find_program(RUBY_EXE "ruby")
 if (RUBY_EXE)



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