Mentions légales du service

Skip to content
Snippets Groups Projects
Commit 2464d52a authored by Thomas PRAMPART's avatar Thomas PRAMPART
Browse files

Merge branch '34-update-cmake-findpython' into 'master'

Resolve "Update: CMake FindPython"

Closes #34

See merge request !158
parents f061fc37 f3543ef4
Branches
Tags
1 merge request!158Resolve "Update: CMake FindPython"
......@@ -49,15 +49,15 @@ ELSE()
ENDIF()
# Find main dependency
if(DEFINED PYTHON_EXECUTABLE AND NOT DEFINED PythonInterp_FOUND)
if(DEFINED Python3_EXECUTABLE AND NOT DEFINED Python3_Interpreter_FOUND)
# Python exec was supplied through command line, just set it in the files and don't ask questions
set(PythonInterp_FOUND TRUE)
set(Python3_Interpreter_FOUND TRUE)
else()
SET(Python_ADDITIONAL_VERSIONS 3.4)
FIND_PACKAGE(PythonInterp 3.4)
SET(Python_ADDITIONAL_VERSIONS 3.7)
FIND_PACKAGE(Python3 COMPONENTS Interpreter Development)
endif()
if(NOT ${PythonInterp_FOUND})
if(NOT Python3_Interpreter_FOUND)
# This is likely a messed-up PYTHONPATH/HOME ISSUE
message(WARNING "Current PYTHONPATH likely not suitable for a Python 3 executable, \
please check that the following values are plausible :\n\
......@@ -68,7 +68,7 @@ or directly give Python3 executable path at build time using \"--python-exec\"\n
These tests will be generated with a generic \"python\" call, please use the \"--python-dir\" \
option of the launcher to set the path to a working python3 directory.")
else()
message(STATUS "Found Python3 at ${PYTHON_EXECUTABLE}")
message(STATUS "Found Python3 at ${Python3_EXECUTABLE}")
endif()
# --------------------
......
......@@ -78,13 +78,13 @@ FOREACH(SCENARIO ${TEST_SCENARIOS})
-DCMD2="${OVT_OPENVIBE_PLAYER} --mode=x --max-time=2000 --play-mode=ff --config-file=${OVT_OPENVIBE_DATA}/openvibe.conf --scenario-file=${LDA_TEST}-${SCENARIO}.xml"
# Launch python checking module
-DCMD3="${PYTHON_EXECUTABLE} ${OVT_VALIDATION_TOOLKIT_PATH}/accuracy.py ${OVT_OPENVIBE_PLAYER_LOG_FILE} Cross-validation 55"
-DCMD3="${Python3_EXECUTABLE} ${OVT_VALIDATION_TOOLKIT_PATH}/accuracy.py ${OVT_OPENVIBE_PLAYER_LOG_FILE} Cross-validation 55"
# Launch Classification scenario
-DCMD4="${OVT_OPENVIBE_PLAYER} --mode=x --max-time=2000 --play-mode=ff --config-file=${OVT_OPENVIBE_DATA}/openvibe.conf --scenario-file=${LDA_TEST}-Classification-${SCENARIO}.xml"
# Launch python checking classification result
-DCMD5="${PYTHON_EXECUTABLE} ${OVT_VALIDATION_TOOLKIT_PATH}/classification.py ${OVT_TEST_TEMPORARY_DIR}/before-classification-${SCENARIO}.csv ${OVT_TEST_TEMPORARY_DIR}/after-classification-${SCENARIO}.csv ${OVT_TEST_DATA_DIR}/classificationreference-${SCENARIO}.txt"
-DCMD5="${Python3_EXECUTABLE} ${OVT_VALIDATION_TOOLKIT_PATH}/classification.py ${OVT_TEST_TEMPORARY_DIR}/before-classification-${SCENARIO}.csv ${OVT_TEST_TEMPORARY_DIR}/after-classification-${SCENARIO}.csv ${OVT_TEST_DATA_DIR}/classificationreference-${SCENARIO}.txt"
......
......@@ -86,7 +86,7 @@ FOREACH(SCENARIO ${TEST_SCENARIOS})
# Launch the scenario with all boxes to test
-DCMD2="${OVT_OPENVIBE_PLAYER} --mode=x --play-mode=ff --max-time=2000 --config-file=${OVT_OPENVIBE_DATA}/openvibe.conf --scenario-file=${SCENARIO_TO_TEST}"
# Compare file result with reference file
-DCMD3="${PYTHON_EXECUTABLE} ${OVT_VALIDATION_TOOLKIT_PATH}/csv-comparator.py ${CMAKE_CURRENT_SOURCE_DIR}/${FILE_TO_COMPARE} ${OVT_TEST_TEMPORARY_DIR}/${OUTPUT_FILE}"
-DCMD3="${Python3_EXECUTABLE} ${OVT_VALIDATION_TOOLKIT_PATH}/csv-comparator.py ${CMAKE_CURRENT_SOURCE_DIR}/${FILE_TO_COMPARE} ${OVT_TEST_TEMPORARY_DIR}/${OUTPUT_FILE}"
-P ${OVT_CMAKE_DIR}/OvtRunMultipleCommand.cmake
)
SET_TESTS_PROPERTIES(${TEST_NAME} PROPERTIES ATTACHED_FILES_ON_FAIL ${OVT_OPENVIBE_PLAYER_LOG_FILE})
......
......@@ -113,7 +113,7 @@ FOREACH(SCENARIO ${TEST_SCENARIOS})
-DCMD3="${OVT_OPENVIBE_PLAYER} --mode=x --max-time=15000 --play-mode=ff --config-file=${OVT_OPENVIBE_DATA}/openvibe.conf --scenario-file=${SCENARIO_TO_TEST}"
#Launch python checking module
-DCMD4="${PYTHON_EXECUTABLE} ${OVT_VALIDATION_TOOLKIT_PATH}/accuracy.py ${OVT_OPENVIBE_PLAYER_LOG_FILE} Cross-validation ${THRESHOLDS}"
-DCMD4="${Python3_EXECUTABLE} ${OVT_VALIDATION_TOOLKIT_PATH}/accuracy.py ${OVT_OPENVIBE_PLAYER_LOG_FILE} Cross-validation ${THRESHOLDS}"
-P ${OVT_CMAKE_DIR}/OvtRunMultipleCommand.cmake
)
......
......@@ -67,7 +67,7 @@ FOREACH(SCENARIO ${TEST_SCENARIOS})
# Launch the scenario with all boxes to test
-DCMD2="${OVT_OPENVIBE_PLAYER} --mode=x --play-mode=ff --max-time=2000 --config-file=${OVT_OPENVIBE_DATA}/openvibe.conf --scenario-file=${SCENARIO_TO_TEST}"
# Compare result with reference file
-DCMD3="${PYTHON_EXECUTABLE} ${OVT_VALIDATION_TOOLKIT_PATH}/csv-analyser.py ${CMAKE_CURRENT_SOURCE_DIR}/reference.csv ${OVT_TEST_TEMPORARY_DIR}/test-timeout.csv"
-DCMD3="${Python3_EXECUTABLE} ${OVT_VALIDATION_TOOLKIT_PATH}/csv-analyser.py ${CMAKE_CURRENT_SOURCE_DIR}/reference.csv ${OVT_TEST_TEMPORARY_DIR}/test-timeout.csv"
-P ${OVT_CMAKE_DIR}/OvtRunMultipleCommand.cmake
)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment