qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [2/2] qpid-proton git commit: NO-JIRA: Don't use cmake ENVIRONMENT test property
Date Tue, 05 Dec 2017 19:03:19 GMT
NO-JIRA: Don't use cmake ENVIRONMENT test property

Older versions of cmake don't support this, including some that claim they do.
Returned to using the python env_py wrapper to set environment variables.


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

Branch: refs/heads/master
Commit: 594872e7fc76b0d121829cc0be215f15f899ff73
Parents: e6505ca
Author: Alan Conway <aconway@redhat.com>
Authored: Tue Dec 5 13:35:24 2017 -0500
Committer: Alan Conway <aconway@redhat.com>
Committed: Tue Dec 5 13:35:24 2017 -0500

----------------------------------------------------------------------
 proton-c/bindings/ruby/CMakeLists.txt | 5 ++---
 proton-c/src/tests/CMakeLists.txt     | 6 ++----
 2 files changed, 4 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/594872e7/proton-c/bindings/ruby/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/bindings/ruby/CMakeLists.txt b/proton-c/bindings/ruby/CMakeLists.txt
index 92db902..4df738d 100644
--- a/proton-c/bindings/ruby/CMakeLists.txt
+++ b/proton-c/bindings/ruby/CMakeLists.txt
@@ -102,15 +102,14 @@ to_native_path("$ENV{PATH};${bin};${bld}" PATH)
 execute_process(COMMAND ${RUBY_EXECUTABLE} -r minitest -e ""
   RESULT_VARIABLE result OUTPUT_QUIET ERROR_QUIET)
 if (result EQUAL 0)  # Have minitest
-
+  set(test_env ${env_py} -- "PATH=${PATH}" "RUBYLIB=${RUBYLIB}" "SASLPASSWD=${SASLPASSWD_EXE}")
   macro(add_ruby_test file)
     get_filename_component(name ${file} NAME_WE)
     string(REPLACE "_" "-" name "ruby-${name}")
     add_test(
       NAME ${name}
-      COMMAND ${RUBY_EXECUTABLE} ${file} -v
+      COMMAND ${test_env} ${RUBY_EXECUTABLE} ${file} -v
       ${ARGN})
-    set_tests_properties(${name} PROPERTIES ENVIRONMENT "PATH=${PATH};RUBYLIB=${RUBYLIB};SASLPASSWD=${SASLPASSWD_EXE}")
   endmacro()
   add_ruby_test(example_test.rb WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/examples/ruby)
   # Old examples for backwards compatibility testing.

http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/594872e7/proton-c/src/tests/CMakeLists.txt
----------------------------------------------------------------------
diff --git a/proton-c/src/tests/CMakeLists.txt b/proton-c/src/tests/CMakeLists.txt
index e24d9cc..9dffca0 100644
--- a/proton-c/src/tests/CMakeLists.txt
+++ b/proton-c/src/tests/CMakeLists.txt
@@ -29,8 +29,7 @@ macro (pn_add_c_test test)
     set_source_files_properties (${ARGN} PROPERTIES LANGUAGE CXX)
   endif (BUILD_WITH_CXX)
   add_test (NAME ${test}
-            COMMAND ${memcheck-cmd} $<TARGET_FILE:${test}>)
-  set_tests_properties(${test} PROPERTIES ENVIRONMENT "PATH=$<TARGET_FILE_DIR:qpid-proton-core>")
+    COMMAND ${env_py} -- "PATH=$<TARGET_FILE_DIR:qpid-proton-core>" ${memcheck-cmd}
$<TARGET_FILE:${test}>)
 endmacro(pn_add_c_test)
 
 pn_add_c_test (c-object-tests object.c)
@@ -58,6 +57,5 @@ if(HAS_PROACTOR)
   # Add the tools directory for the 'proctest' module
   set_search_path(pypath "${CMAKE_SOURCE_DIR}/tools/py" "$ENV{PYTHON_PATH}")
 
-  add_test(NAME c-fdlimit-tests COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/fdlimit.py)
-  set_tests_properties(c-fdlimit-tests PROPERTIES ENVIRONMENT "PATH=${path};PYTHONPATH=${pypath}")
+  add_test(NAME c-fdlimit-tests COMMAND ${env_py} -- "PATH=${path}" "PYTHONPATH=${pypath}"
${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/fdlimit.py)
 endif(HAS_PROACTOR)


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


Mime
View raw message