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 17:18:23 UTC

svn commit: r1628467 - in /qpid/proton/trunk: CMakeLists.txt proton-c/src/tests/CMakeLists.txt

Author: astitcher
Date: Tue Sep 30 15:18:23 2014
New Revision: 1628467

URL: http://svn.apache.org/r1628467
Log:
PROTON-705: Fix tests on windows so that they run directly from a build
(without having to fix up the environment with config.bat)

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

Modified: qpid/proton/trunk/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/CMakeLists.txt?rev=1628467&r1=1628466&r2=1628467&view=diff
==============================================================================
--- qpid/proton/trunk/CMakeLists.txt (original)
+++ qpid/proton/trunk/CMakeLists.txt Tue Sep 30 15:18:23 2014
@@ -24,7 +24,7 @@ set (CMAKE_BUILD_TYPE RelWithDebInfo CAC
 if (CMAKE_BUILD_TYPE MATCHES "Deb")
   set (has_debug_symbols " (has debug symbols)")
 endif (CMAKE_BUILD_TYPE MATCHES "Deb")
-message("Build type is \"${CMAKE_BUILD_TYPE}\"${has_debug_symbols}")
+message(STATUS "Build type is \"${CMAKE_BUILD_TYPE}\"${has_debug_symbols}")
 
 option(BUILD_WITH_CXX "Compile Proton using C++" OFF)
 if ("${CMAKE_GENERATOR}" MATCHES "^Visual Studio")

Modified: qpid/proton/trunk/proton-c/src/tests/CMakeLists.txt
URL: http://svn.apache.org/viewvc/qpid/proton/trunk/proton-c/src/tests/CMakeLists.txt?rev=1628467&r1=1628466&r2=1628467&view=diff
==============================================================================
--- qpid/proton/trunk/proton-c/src/tests/CMakeLists.txt (original)
+++ qpid/proton/trunk/proton-c/src/tests/CMakeLists.txt Tue Sep 30 15:18:23 2014
@@ -28,7 +28,16 @@ macro (pn_add_c_test test file)
   add_executable (${test} ${file})
   target_link_libraries (${test} qpid-proton)
   pn_c_files (${file})
-  add_test (${test} ${memcheck-cmd} ${CMAKE_CURRENT_BINARY_DIR}/${test})
+  if (CMAKE_SYSTEM_NAME STREQUAL Windows)
+    get_target_property(QPID_PROTON_TARGET qpid-proton LOCATION_${bld_suffix})
+    get_target_property(${test}_LOCATION ${test} LOCATION_${bld_suffix})
+    get_filename_component(QPID_PROTON_TARGET_DIR ${QPID_PROTON_TARGET} DIRECTORY)
+    add_test (${test} ${PYTHON_EXECUTABLE} ${env_py}
+	          "PATH=${QPID_PROTON_TARGET_DIR}"
+	          ${${test}_LOCATION})
+  else ()
+    add_test (${test} ${memcheck-cmd} ${CMAKE_CURRENT_BINARY_DIR}/${test})
+  endif ()
 endmacro(pn_add_c_test)
 
 pn_add_c_test (c-object-tests object.c)



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