Skip to content

Commit

Permalink
Remove use of deprecated FindPythonInterp (#4447)
Browse files Browse the repository at this point in the history
Signed-off-by: EduPonz <eduardoponz@eprosima.com>
  • Loading branch information
EduPonz authored and Mario-DL committed May 10, 2024
1 parent 2bcec0c commit 53e6a79
Show file tree
Hide file tree
Showing 11 changed files with 69 additions and 69 deletions.
6 changes: 3 additions & 3 deletions cmake/common/test_wrapper.cmake.in
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
find_package(PythonInterp 3)
find_package(Python3 COMPONENTS Interpreter)

# Clean first so the exit code comes from the second process
message(STATUS "test_wrapper - Running command: ${PYTHON_EXECUTABLE} @PROJECT_BINARY_DIR@/tools/fastdds/fastdds.py shm clean")
execute_process(COMMAND ${PYTHON_EXECUTABLE} @PROJECT_BINARY_DIR@/tools/fastdds/fastdds.py shm clean)
message(STATUS "test_wrapper - Running command: ${Python3_EXECUTABLE} @PROJECT_BINARY_DIR@/tools/fastdds/fastdds.py shm clean")
execute_process(COMMAND ${Python3_EXECUTABLE} @PROJECT_BINARY_DIR@/tools/fastdds/fastdds.py shm clean)

message(STATUS "test_wrapper - Running command: ${ACTUAL_TEST} ${ACTUAL_ARGS}")
execute_process(COMMAND ${ACTUAL_TEST} ${ACTUAL_ARGS})
4 changes: 2 additions & 2 deletions test/CTestCustom.cmake.in
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
find_package(PythonInterp 3)
find_package(Python3 COMPONENTS Interpreter REQUIRED)

execute_process(COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../tools/fastdds/fastdds.py shm clean)
execute_process(COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_SOURCE_DIR}/../tools/fastdds/fastdds.py shm clean)
52 changes: 26 additions & 26 deletions test/communication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

find_package(PythonInterp 3)
find_package(Python3 COMPONENTS Interpreter)

###############################################################################
# Binaries
Expand Down Expand Up @@ -202,9 +202,9 @@ if(SECURITY)
${CMAKE_CURRENT_BINARY_DIR}/permissions_helloworld_securehelloworld.smime COPYONLY)
endif()

if(PYTHONINTERP_FOUND)
if(Python3_Interpreter_FOUND)
add_test(NAME SimpleCommunicationBestEffort
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${PYTHON_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${Python3_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)

# Set test with label NoMemoryCheck
set_property(TEST SimpleCommunicationBestEffort PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -222,7 +222,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SimpleCommunicationReliable
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${PYTHON_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${Python3_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)

# Set test with label NoMemoryCheck
set_property(TEST SimpleCommunicationReliable PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -240,7 +240,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SimpleCommunicationReliableBestEffort
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${PYTHON_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${Python3_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)

# Set test with label NoMemoryCheck
set_property(TEST SimpleCommunicationReliableBestEffort PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -258,7 +258,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SimpleMixCommunicationBestEffort
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${PYTHON_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_mix_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${Python3_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_mix_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)

# Set test with label NoMemoryCheck
set_property(TEST SimpleMixCommunicationBestEffort PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -276,7 +276,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SimpleMixCommunicationReliable
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${PYTHON_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_mix_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${Python3_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_mix_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)

# Set test with label NoMemoryCheck
set_property(TEST SimpleMixCommunicationReliable PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -295,7 +295,7 @@ if(PYTHONINTERP_FOUND)

if(SECURITY)
add_test(NAME SimpleCommunicationSecureBestEffort
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${PYTHON_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${Python3_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)

# Set test with label NoMemoryCheck
set_property(TEST SimpleCommunicationSecureBestEffort PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -317,7 +317,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SimpleCommunicationSecureMsgCryptoBestEffort
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_subs_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_subs_secure_crypto_communication.py
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub secure_msg_crypto_besteffort_pub_profile.xml
--sub $<TARGET_FILE:SimpleCommunicationSubscriber>
Expand All @@ -334,7 +334,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SimpleCommunicationSecureMsgSubmsgCryptoBestEffort
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_subs_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_subs_secure_crypto_communication.py
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub secure_msg_submsg_crypto_besteffort_pub_profile.xml
--sub $<TARGET_FILE:SimpleCommunicationSubscriber>
Expand All @@ -351,7 +351,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SimpleCommunicationSecureSubmsgCryptoBestEffort
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_subs_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_subs_secure_crypto_communication.py
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub secure_submsg_crypto_besteffort_pub_profile.xml
--sub $<TARGET_FILE:SimpleCommunicationSubscriber>
Expand All @@ -368,7 +368,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SecureDiscoverServerSimplePubSubSecureMsgCrypto
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/secure_ds_pubsub_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/secure_ds_pubsub_secure_crypto_communication.py
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub secure_ds_simple_secure_msg_crypto_pub_profile.xml
--sub $<TARGET_FILE:SimpleCommunicationSubscriber>
Expand All @@ -388,7 +388,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SecureDiscoverServerSimplePubSubSecureNoDiscoveryNoRTPSProtectionMsgCrypto
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/secure_ds_pubsub_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/secure_ds_pubsub_secure_crypto_communication.py
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub secure_ds_simple_secure_no_discovery_no_rtps_protection_pub_profile.xml
--sub $<TARGET_FILE:SimpleCommunicationSubscriber>
Expand All @@ -408,7 +408,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SecureDiscoverServerSimplePubSubSecureNoDiscoveryProtectionMsgCrypto
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/secure_ds_pubsub_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/secure_ds_pubsub_secure_crypto_communication.py
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub secure_ds_simple_secure_no_discovery_protection_pub_profile.xml
--sub $<TARGET_FILE:SimpleCommunicationSubscriber>
Expand All @@ -428,7 +428,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SecureDiscoverServerSimplePubSubSecureNoRTPSProtectionMsgCrypto
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/secure_ds_pubsub_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/secure_ds_pubsub_secure_crypto_communication.py
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub secure_ds_simple_secure_no_rtps_protection_pub_profile.xml
--sub $<TARGET_FILE:SimpleCommunicationSubscriber>
Expand All @@ -448,7 +448,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME TwoSecureDiscoverServersSimplePubSubSecureMsgCrypto
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_secure_ds_pubsub_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_secure_ds_pubsub_secure_crypto_communication.py
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub secure_ds_simple_secure_msg_crypto_pub_profile.xml
--sub $<TARGET_FILE:SimpleCommunicationSubscriber>
Expand All @@ -467,7 +467,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME TwoSecureDiscoverServersSimplePubSubSecureNoDiscoveryNoRTPSProtectionMsgCrypto
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_secure_ds_pubsub_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_secure_ds_pubsub_secure_crypto_communication.py
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub secure_ds_simple_secure_no_discovery_no_rtps_protection_pub_profile.xml
--sub $<TARGET_FILE:SimpleCommunicationSubscriber>
Expand All @@ -486,7 +486,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME TwoSecureDiscoverServersSimplePubSubSecureNoDiscoveryProtectionMsgCrypto
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_secure_ds_pubsub_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_secure_ds_pubsub_secure_crypto_communication.py
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub secure_ds_simple_secure_no_discovery_protection_pub_profile.xml
--sub $<TARGET_FILE:SimpleCommunicationSubscriber>
Expand All @@ -505,7 +505,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME TwoSecureDiscoverServersSimplePubSubSecureNoRTPSProtectionMsgCrypto
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_secure_ds_pubsub_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_secure_ds_pubsub_secure_crypto_communication.py
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub secure_ds_simple_secure_no_rtps_protection_pub_profile.xml
--sub $<TARGET_FILE:SimpleCommunicationSubscriber>
Expand All @@ -524,7 +524,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME AllowUnauthenticatedSimplePubSecureNoRTPSProtectionSubNonSecure
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_subs_secure_crypto_communication.py
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/multiple_subs_secure_crypto_communication.py
--n-subs 1
--pub $<TARGET_FILE:SimpleCommunicationPublisher>
--xml-pub simple_secure_allow_unauthenticated_pub_profile.xml
Expand All @@ -544,7 +544,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME LivelinessAssertion
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${PYTHON_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/liveliness_assertion.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${Python3_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/liveliness_assertion.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)

# Set test with label NoMemoryCheck
set_property(TEST LivelinessAssertion PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -559,7 +559,7 @@ if(PYTHONINTERP_FOUND)
"PATH=$<TARGET_FILE_DIR:${PROJECT_NAME}>\\;$<TARGET_FILE_DIR:fastcdr>\\;${WIN_PATH}")
endif()
add_test(NAME AutomaticLivelinessAssertion
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${PYTHON_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/automatic_liveliness_assertion.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${Python3_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/automatic_liveliness_assertion.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)

# Set test with label NoMemoryCheck
set_property(TEST AutomaticLivelinessAssertion PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -575,7 +575,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME TwoPublishersCommunicationBestEffort
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${PYTHON_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/two_publishers_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${Python3_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/two_publishers_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)

# Set test with label NoMemoryCheck
set_property(TEST TwoPublishersCommunicationBestEffort PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -593,7 +593,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME TwoPublishersCommunicationReliable
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/two_publishers_communication.py)
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/two_publishers_communication.py)

# Set test with label NoMemoryCheck
set_property(TEST TwoPublishersCommunicationReliable PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -611,7 +611,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SimpleCommunicationBestEffortFixed
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${PYTHON_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${Python3_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/simple_communication.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)

# Set test with label NoMemoryCheck
set_property(TEST SimpleCommunicationBestEffortFixed PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -633,7 +633,7 @@ if(PYTHONINTERP_FOUND)
endif()

add_test(NAME SHMCommunicationSubscriberDiesWhileProcessingMessage
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${PYTHON_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/shm_communication_subscriber_dies_while_processing_message.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)
COMMAND ${CMAKE_COMMAND} -DACTUAL_TEST=${Python3_EXECUTABLE} -DACTUAL_ARGS=${CMAKE_CURRENT_BINARY_DIR}/shm_communication_subscriber_dies_while_processing_message.py -P ${CMAKE_CURRENT_BINARY_DIR}/test_wrapper.cmake)

# Set test with label NoMemoryCheck
set_property(TEST SHMCommunicationSubscriberDiesWhileProcessingMessage PROPERTY LABELS "NoMemoryCheck")
Expand Down
8 changes: 4 additions & 4 deletions test/dds/communication/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.

find_package(PythonInterp 3)
find_package(Python3 COMPONENTS Interpreter)

add_definitions(
-DBOOST_ASIO_STANDALONE
Expand Down Expand Up @@ -165,10 +165,10 @@ endif()
###############################################################################
# Tests specification
###############################################################################
if(PYTHONINTERP_FOUND)
if(Python3_Interpreter_FOUND)
# Dynamic types test
add_test(NAME DDSSimpleCommunicationTypeDiscovery
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/simple_communication_dynamic.py)
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/simple_communication_dynamic.py)

# Set test with label NoMemoryCheck
set_property(TEST DDSSimpleCommunicationTypeDiscovery PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -190,7 +190,7 @@ if(PYTHONINTERP_FOUND)
set(TEST_NAME DDSCommunication_${TEST_DEFINITION})
add_test(
NAME ${TEST_NAME}
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_BUILDER}
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/${TEST_BUILDER}
${TEST_DEFINITION}.json
)

Expand Down
6 changes: 3 additions & 3 deletions test/dds/discovery/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

if(NOT ((MSVC OR MSVC_IDE) AND EPROSIMA_INSTALLER) AND fastcdr_FOUND)
find_package(PythonInterp 3)
find_package(Python3 COMPONENTS Interpreter)

###########################################################################
# Binaries
Expand Down Expand Up @@ -46,9 +46,9 @@ if(NOT ((MSVC OR MSVC_IDE) AND EPROSIMA_INSTALLER) AND fastcdr_FOUND)
math(EXPR W_UNICAST_PORT_RANDOM_NUMBER "${W_UNICAST_PORT_RANDOM_NUMBER} + 1024")
endif()

if(PYTHONINTERP_FOUND AND NOT APPLE AND NOT WIN32)
if(Python3_Interpreter_FOUND AND NOT APPLE AND NOT WIN32)
add_test(NAME AddDiscoveryServerToListFromEnvironmentFile
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/client_server_dynamic_discovery.py)
COMMAND ${Python3_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/client_server_dynamic_discovery.py)

set_property(TEST AddDiscoveryServerToListFromEnvironmentFile PROPERTY ENVIRONMENT
"CLIENT_SERVER_DYNAMIC_DISCOVERY_BIN=$<TARGET_FILE:DDSParticipantDiscovery>")
Expand Down
Loading

0 comments on commit 53e6a79

Please sign in to comment.