jiridanek commented on a change in pull request #271:
URL: https://github.com/apache/qpid-proton/pull/271#discussion_r502779168



##########
File path: cpp/CMakeLists.txt
##########
@@ -231,90 +231,92 @@ install (FILES
   ${CMAKE_CURRENT_BINARY_DIR}/ProtonCppConfigVersion.cmake
   DESTINATION ${LIB_INSTALL_DIR}/cmake/ProtonCpp)
 
-set(testdata "${CMAKE_CURRENT_BINARY_DIR}/testdata")
-set(test_env "")
-
-# SASL configuration for tests
-if(CyrusSASL_Saslpasswd_EXECUTABLE)
-  
configure_file("${CMAKE_CURRENT_SOURCE_DIR}/testdata/sasl-conf/proton-server.conf.in"
-    "${testdata}/sasl-conf/proton-server.conf")
-  execute_process(
-    COMMAND echo password
-    COMMAND ${CyrusSASL_Saslpasswd_EXECUTABLE} -c -p -f 
"${testdata}/sasl-conf/proton.sasldb" -u proton user
-    RESULT_VARIABLE ret)
-  if(ret)
-    message(WARNING "${CyrusSASL_Saslpasswd_EXECUTABLE}: error ${ret} - some 
SASL tests will be skipped")
-  else()
-    set(test_env ${test_env} "PN_SASL_CONFIG_PATH=${testdata}/sasl-conf")
+if (BUILD_TESTING)
+  set(testdata "${CMAKE_CURRENT_BINARY_DIR}/testdata")

Review comment:
       Adding one level of indentation to these multiple screens of code looks 
undesirable. It would be best to factor out all this into its own `tests.cmake` 
and conditionally include it here. I'll have to try if/how this works in CMake.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@qpid.apache.org
For additional commands, e-mail: dev-h...@qpid.apache.org

Reply via email to