From c4f573a8dc4785d1e7928e2c5030072e3d01b916 Mon Sep 17 00:00:00 2001 From: Jorrit Schaap <schaap@astron.nl> Date: Wed, 13 Jun 2018 11:33:20 +0000 Subject: [PATCH] Task #11004: replaced erroneously used c++ HAVE_QPID variable by an actual test if the qpid daemon is running on this system --- LCS/Messaging/python/messaging/test/CMakeLists.txt | 7 ++++--- SAS/OTDB_Services/test/CMakeLists.txt | 7 ++++--- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/LCS/Messaging/python/messaging/test/CMakeLists.txt b/LCS/Messaging/python/messaging/test/CMakeLists.txt index 361727be535..a4f5902ced4 100644 --- a/LCS/Messaging/python/messaging/test/CMakeLists.txt +++ b/LCS/Messaging/python/messaging/test/CMakeLists.txt @@ -8,12 +8,13 @@ set(_qpid_tests t_RPC t_service_message_handler) -if(HAVE_QPID) +execute_process(COMMAND qpid-config RESULT_VARIABLE QPID_CONFIG_RESULT OUTPUT_QUIET ERROR_QUIET) + +if(${QPID_CONFIG_RESULT} EQUAL 0) foreach(_test ${_qpid_tests}) lofar_add_test(${_test}) endforeach() else() lofar_join_arguments(_qpid_tests) - message(WARNING "Qpid is not set." - "The following tests will not be run: ${_qpid_tests}") + message(WARNING "No running qpid daemon found. The following tests will not be run: ${_qpid_tests}") endif() diff --git a/SAS/OTDB_Services/test/CMakeLists.txt b/SAS/OTDB_Services/test/CMakeLists.txt index 513a0962907..3336d559d7e 100644 --- a/SAS/OTDB_Services/test/CMakeLists.txt +++ b/SAS/OTDB_Services/test/CMakeLists.txt @@ -8,12 +8,13 @@ set(_qpid_tests t_TreeService t_TreeStatusEvents) -if(HAVE_QPID) +execute_process(COMMAND qpid-config RESULT_VARIABLE QPID_CONFIG_RESULT OUTPUT_QUIET ERROR_QUIET) + +if(${QPID_CONFIG_RESULT} EQUAL 0) foreach(_test ${_qpid_tests}) lofar_add_test(${_test}) endforeach() else() lofar_join_arguments(_qpid_tests) - message(WARNING "Qpid is not set." - "The following tests will not be run: ${_qpid_tests}") + message(WARNING "No running qpid daemon found. The following tests will not be run: ${_qpid_tests}") endif() -- GitLab