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 e7c3664 commit cf03ad0
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 53 deletions.
30 changes: 15 additions & 15 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 @@ -196,7 +196,7 @@ if(SECURITY)
${CMAKE_CURRENT_BINARY_DIR}/permissions_helloworld_securehelloworld.smime COPYONLY)
endif()

if(PYTHONINTERP_FOUND)
if(Python3_Interpreter_FOUND)
add_test(NAME SimpleCommunicationBestEffort
COMMAND ${PYTHON_EXECUTABLE} ${CMAKE_CURRENT_BINARY_DIR}/simple_communication.py)

Expand Down Expand Up @@ -311,7 +311,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 @@ -328,7 +328,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 @@ -345,7 +345,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 @@ -362,7 +362,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 @@ -382,7 +382,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 @@ -402,7 +402,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 @@ -422,7 +422,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 @@ -442,7 +442,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 @@ -461,7 +461,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 @@ -480,7 +480,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 @@ -499,7 +499,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 @@ -518,7 +518,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 Down Expand Up @@ -587,7 +587,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 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 @@ -161,10 +161,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 @@ -186,7 +186,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 @@ -42,9 +42,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
16 changes: 8 additions & 8 deletions test/performance/latency/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ endforeach(latency_test_name)
###########################################################################
# Create tests #
###########################################################################
find_package(PythonInterp 3 REQUIRED)
if(PYTHONINTERP_FOUND)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
if(Python3_Interpreter_FOUND)
# Loop over the test names
foreach(latency_test_name ${LATENCY_TEST_LIST})

Expand Down Expand Up @@ -135,7 +135,7 @@ if(PYTHONINTERP_FOUND)
# Add the test
add_test(
NAME performance.latency.${latency_test_name}
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/latency_tests.py
${LATENCY_TEST_BIN}
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${latency_test_name}.xml
Expand Down Expand Up @@ -172,7 +172,7 @@ if(PYTHONINTERP_FOUND)

add_test(
NAME performance.latency.${latency_test_name}.security
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/latency_tests.py
${LATENCY_TEST_BIN}
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${latency_test_name}.xml
Expand All @@ -198,7 +198,7 @@ if(PYTHONINTERP_FOUND)

add_test(
NAME performance.latency.${latency_test_name}.data_sharing
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/latency_tests.py
${LATENCY_TEST_BIN}
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${latency_test_name}.xml
Expand All @@ -218,7 +218,7 @@ if(PYTHONINTERP_FOUND)

add_test(
NAME performance.latency.${latency_test_name}.data_loans
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/latency_tests.py
${LATENCY_TEST_BIN}
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${latency_test_name}.xml
Expand All @@ -236,7 +236,7 @@ if(PYTHONINTERP_FOUND)

add_test(
NAME performance.latency.${latency_test_name}.data_loans.security
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/latency_tests.py
${LATENCY_TEST_BIN}
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${latency_test_name}.xml
Expand Down Expand Up @@ -265,7 +265,7 @@ if(PYTHONINTERP_FOUND)

add_test(
NAME performance.latency.${latency_test_name}.data_loans_and_sharing
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/latency_tests.py
${LATENCY_TEST_BIN}
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${latency_test_name}.xml
Expand Down
16 changes: 8 additions & 8 deletions test/performance/throughput/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ endforeach(throughput_test_name)
###########################################################################
# Create tests #
###########################################################################
find_package(PythonInterp 3 REQUIRED)
if(PYTHONINTERP_FOUND)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
if(Python3_Interpreter_FOUND)
# Loop over the test names
foreach(throughput_test_name ${THROUGHPUT_TEST_LIST})

Expand Down Expand Up @@ -135,7 +135,7 @@ if(PYTHONINTERP_FOUND)
# Add the test
add_test(
NAME performance.throughput.${throughput_test_name}
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/throughput_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${throughput_test_name}.xml
--recoveries_file ${CMAKE_CURRENT_SOURCE_DIR}/recoveries.csv
Expand Down Expand Up @@ -171,7 +171,7 @@ if(PYTHONINTERP_FOUND)

add_test(
NAME performance.throughput.${throughput_test_name}.security
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/throughput_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${throughput_test_name}.xml
--recoveries_file ${CMAKE_CURRENT_SOURCE_DIR}/recoveries.csv
Expand All @@ -197,7 +197,7 @@ if(PYTHONINTERP_FOUND)

add_test(
NAME performance.throughput.${throughput_test_name}.data_sharing
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/throughput_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${throughput_test_name}.xml
--recoveries_file ${CMAKE_CURRENT_SOURCE_DIR}/recoveries.csv
Expand All @@ -217,7 +217,7 @@ if(PYTHONINTERP_FOUND)

add_test(
NAME performance.throughput.${throughput_test_name}.data_loans
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/throughput_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${throughput_test_name}.xml
--recoveries_file ${CMAKE_CURRENT_SOURCE_DIR}/recoveries.csv
Expand All @@ -234,7 +234,7 @@ if(PYTHONINTERP_FOUND)

add_test(
NAME performance.throughput.${throughput_test_name}.data_loans.security
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/throughput_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${throughput_test_name}.xml
--recoveries_file ${CMAKE_CURRENT_SOURCE_DIR}/recoveries.csv
Expand Down Expand Up @@ -263,7 +263,7 @@ if(PYTHONINTERP_FOUND)

add_test(
NAME performance.throughput.${throughput_test_name}.data_loans_and_sharing
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/throughput_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${throughput_test_name}.xml
--recoveries_file ${CMAKE_CURRENT_SOURCE_DIR}/recoveries.csv
Expand Down
8 changes: 4 additions & 4 deletions test/performance/video/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -160,15 +160,15 @@ if(GST_FOUND)
###########################################################################
# Create tests #
###########################################################################
find_package(PythonInterp 3 REQUIRED)
if(PYTHONINTERP_FOUND)
find_package(Python3 COMPONENTS Interpreter REQUIRED)
if(Python3_Interpreter_FOUND)
if(GST_FOUND)
# Loop over the test names
foreach(video_test_name ${VIDEO_TEST_LIST})
# Add the test
add_test(
NAME performance.video.${video_test_name}
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/video_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${video_test_name}.xml
)
Expand Down Expand Up @@ -209,7 +209,7 @@ if(GST_FOUND)
# Add the secure verison
add_test(
NAME performance.video.${video_test_name}_security
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/video_tests.py
--xml_file ${CMAKE_CURRENT_SOURCE_DIR}/xml/${video_test_name}.xml
)
Expand Down
8 changes: 4 additions & 4 deletions test/profiling/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ configure_file("cycles_tests.py" "cycles_tests.py")
configure_file("memory_tests.py" "memory_tests.py")
configure_file("memory_analysis.py" "memory_analysis.py")

find_package(PythonInterp 3 REQUIRED)
find_package(Python3 COMPONENTS Interpreter REQUIRED)

if(PYTHONINTERP_FOUND)
if(Python3_Interpreter_FOUND)
###############################################################################
# MemoryTest
###############################################################################
add_test(NAME MemoryTest
COMMAND ${PYTHON_EXECUTABLE} memory_tests.py)
COMMAND ${Python3_EXECUTABLE} memory_tests.py)

# Set test with label NoMemoryCheck
set_property(TEST MemoryTest PROPERTY LABELS "NoMemoryCheck")
Expand All @@ -77,7 +77,7 @@ if(PYTHONINTERP_FOUND)
# CyclesTest
###############################################################################
add_test(NAME CyclesTest
COMMAND ${PYTHON_EXECUTABLE} cycles_tests.py)
COMMAND ${Python3_EXECUTABLE} cycles_tests.py)

# Set test with label NoMemoryCheck
set_property(TEST CyclesTest PROPERTY LABELS "NoMemoryCheck")
Expand Down
6 changes: 3 additions & 3 deletions test/system/tools/fastdds/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
# Create tests #
###########################################################################

find_package(PythonInterp 3 REQUIRED)
find_package(Python3 COMPONENTS Interpreter REQUIRED)

if(PYTHONINTERP_FOUND)
if(Python3_Interpreter_FOUND)

# Set environment for tests
set(TEST_ENVIRONMENT
Expand All @@ -35,7 +35,7 @@ if(PYTHONINTERP_FOUND)
foreach(TEST IN LISTS TESTS)
add_test(
NAME system.tools.fastdds.${TEST}
COMMAND ${PYTHON_EXECUTABLE}
COMMAND ${Python3_EXECUTABLE}
${CMAKE_CURRENT_SOURCE_DIR}/tests.py
${CMAKE_INSTALL_PREFIX}
${TEST}
Expand Down
Loading

0 comments on commit cf03ad0

Please sign in to comment.