Repository: qpid-proton
Updated Branches:
  refs/heads/master 391397f59 -> f86e74f8c


PROTON-1768: Allow the tox tests on all platforms


Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo
Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/b5553d12
Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/b5553d12
Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/b5553d12

Branch: refs/heads/master
Commit: b5553d123c26ebf8e3738ded1bd0a2edc1fe3280
Parents: 391397f
Author: Andrew Stitcher <[email protected]>
Authored: Wed Feb 21 17:26:03 2018 -0500
Committer: Andrew Stitcher <[email protected]>
Committed: Wed Feb 21 21:53:27 2018 -0500

----------------------------------------------------------------------
 proton-c/CMakeLists.txt | 60 +++++++++++++++++++++++---------------------
 1 file changed, 31 insertions(+), 29 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/b5553d12/proton-c/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt
index d3b290e..192d766 100644
--- a/proton-c/CMakeLists.txt
+++ b/proton-c/CMakeLists.txt
@@ -765,39 +765,41 @@ if (BUILD_PYTHON)
               ${PYTHON_EXECUTABLE} -- ${python_coverage_options} 
"${py_root}/proton-test")
   set_tests_properties(python-test PROPERTIES PASS_REGULAR_EXPRESSION "Totals: 
.* 0 failed")
 
-  # Eventually, we'll get rid of this check when other
-  # platforms will be supported. Since `setup.py` will skip
-  # the build for non linux plaforms, it doesn't make sense
-  # to try to run them.
-  option(TOX_TEST "Enable muti-version python testing with TOX" ON)
-  set(tox_default "py26,py27,py33,py34,py35,py36")
-  set(TOX_ENVLIST ${tox_default} CACHE STRING "List of python environments for 
TOX tests" )
-  if (NOT (TOX_ENVLIST STREQUAL tox_default))
-    message(WARNING "non-default TOX test set '${TOX_ENVLIST}' (default 
'${tox_default}')")
-  endif()
-  if (CMAKE_SYSTEM_NAME STREQUAL Linux AND TOX_TEST)
-    find_program(TOX_EXE "tox")
-    if (CMAKE_BUILD_TYPE MATCHES "Coverage")
-      message(STATUS "Building for coverage analysis; skipping the 
python-tox-tests")
-    elseif (TOX_EXE)
-      configure_file(
-        "${CMAKE_CURRENT_SOURCE_DIR}/tox.ini.in"
-        "${CMAKE_CURRENT_BINARY_DIR}/tox.ini")
-      add_test (NAME python-tox-test
-                COMMAND ${env_py}
+  find_program(TOX_EXECUTABLE "tox")
+  mark_as_advanced(TOX_EXECUTABLE)
+  if (TOX_EXECUTABLE)
+    option(ENABLE_TOX_TEST "Enable muti-version python testing with TOX" ON)
+
+    set(tox_default "py26,py27,py33,py34,py35,py36")
+    set(TOX_ENVLIST ${tox_default} CACHE STRING "List of python environments 
for TOX tests" )
+    mark_as_advanced(TOX_ENVLIST)
+
+    if (NOT (TOX_ENVLIST STREQUAL tox_default))
+      message(WARNING "non-default TOX test set '${TOX_ENVLIST}' (default 
'${tox_default}')")
+    endif()
+    if (ENABLE_TOX_TEST)
+      if (CMAKE_BUILD_TYPE MATCHES "Coverage")
+        message(STATUS "Building for coverage analysis; skipping the 
python-tox-tests")
+      else ()
+        configure_file(
+          "${CMAKE_CURRENT_SOURCE_DIR}/tox.ini.in"
+          "${CMAKE_CURRENT_BINARY_DIR}/tox.ini")
+        add_test (NAME python-tox-test
+                  COMMAND ${env_py}
                   "PATH=${py_path}"
                   "SASLPASSWD=${SASLPASSWD_EXE}"
                   "SWIG=${SWIG_EXECUTABLE}"
                   ${VALGRIND_ENV}
-                  ${TOX_EXE})
-      set_tests_properties(python-tox-test
-                           PROPERTIES
-                             PASS_REGULAR_EXPRESSION "Totals: .* ignored, 0 
failed"
-                             FAIL_REGULAR_EXPRESSION "ERROR:[ ]+py[0-9]*: 
commands failed")
-    else (TOX_EXE)
-      message(STATUS "The tox tool is not available; skipping the 
python-tox-tests")
-    endif ()
-  endif (CMAKE_SYSTEM_NAME STREQUAL Linux AND TOX_TEST)
+                  ${TOX_EXECUTABLE})
+        set_tests_properties(python-tox-test
+                             PROPERTIES
+                               PASS_REGULAR_EXPRESSION "Totals: .* ignored, 0 
failed"
+                               FAIL_REGULAR_EXPRESSION "ERROR:[ ]+py[0-9]*: 
commands failed")
+      endif ()
+    endif (ENABLE_TOX_TEST)
+  else (TOX_EXECUTABLE)
+    message(STATUS "The tox tool is not available; skipping the 
python-tox-tests")
+  endif(TOX_EXECUTABLE)
 
   set (perf_pythonpath "${py_pythonpath}" "${CMAKE_SOURCE_DIR}/examples/cpp")
   to_native_path ("${perf_pythonpath}" perf_pythonpath)


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to