Skip to content

Commit

Permalink
Fix Python Installation version in Github CI. Address failing system …
Browse files Browse the repository at this point in the history
…tests environment issues (#4759) (#4764)

* Fix Python Installation version in Github CI. Address failing system tests environment issues (#4759)

* Refs #20965: Install a fix python version in ubuntu and windows cis

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #20965: Decide Python environment depending on the version

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #20965: Prevent Qt installation from setting up python in Ubuntu CI

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

* Refs #20965: Add some comments

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>

---------

Signed-off-by: Mario Dominguez <mariodominguez@eprosima.com>
(cherry picked from commit 3b2e781)

* Remove use of deprecated FindPythonInterp (#4447)

Signed-off-by: EduPonz <eduardoponz@eprosima.com>

---------

Signed-off-by: EduPonz <eduardoponz@eprosima.com>
Co-authored-by: Mario Domínguez López <116071334+Mario-DL@users.noreply.github.com>
Co-authored-by: Eduardo Ponz Segrelles <eduardoponz@eprosima.com>
  • Loading branch information
3 people authored May 13, 2024
1 parent c7378dc commit 8fd1914
Show file tree
Hide file tree
Showing 15 changed files with 283 additions and 232 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/reusable-ubuntu-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ jobs:
path: src/fastrtps
ref: ${{ inputs.fastdds-branch }}

- name: Install Fix Python version
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'

- name: Get minimum supported version of CMake
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
Expand Down Expand Up @@ -114,12 +119,15 @@ jobs:
ref: ${{ steps.get_shapes_demo_branch.outputs.deduced_branch }}

# Required for Shapes Demo
# Do not setup python as it will internally modify the pythonLocation env variable
# and we want to use a fix version
- name: Install Qt
uses: jurplel/install-qt-action@v2.13.0
with:
version: '5.15.2'
dir: '${{ github.workspace }}/qt_installation/'
modules: 'qtcharts'
setup-python: 'false'

- name: Colcon build
continue-on-error: false
Expand Down
5 changes: 5 additions & 0 deletions .github/workflows/reusable-windows-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,11 @@ jobs:
submodules: true
ref: ${{ inputs.fastdds_branch }}

- name: Install Fix Python version
uses: eProsima/eProsima-CI/external/setup-python@v0
with:
python-version: '3.11'

- name: Get minimum supported version of CMake
uses: eProsima/eProsima-CI/external/get-cmake@v0
with:
Expand Down
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 8fd1914

Please sign in to comment.