Author: gsim Date: Fri Oct 10 12:59:29 2014 New Revision: 1630879 URL: http://svn.apache.org/r1630879 Log: NO-JIRA: If we didn't build the python bindings then we can't run python tests
Modified: qpid/proton/branches/examples/proton-c/CMakeLists.txt Modified: qpid/proton/branches/examples/proton-c/CMakeLists.txt URL: http://svn.apache.org/viewvc/qpid/proton/branches/examples/proton-c/CMakeLists.txt?rev=1630879&r1=1630878&r2=1630879&view=diff ============================================================================== --- qpid/proton/branches/examples/proton-c/CMakeLists.txt (original) +++ qpid/proton/branches/examples/proton-c/CMakeLists.txt Fri Oct 10 12:59:29 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-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org