mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-11-28 13:21:10 -07:00
PYTHONPATH uses a platform dependent path separator after all
This commit is contained in:
parent
04548d2862
commit
0c215331ee
1 changed files with 8 additions and 2 deletions
|
|
@ -30,13 +30,19 @@ function(cura_add_test)
|
|||
set_tests_properties(${_NAME} PROPERTIES ENVIRONMENT PYTHONPATH=${_PYTHONPATH})
|
||||
endfunction()
|
||||
|
||||
cura_add_test(NAME pytest-main DIRECTORY ${CMAKE_SOURCE_DIR}/tests PYTHONPATH "${CMAKE_SOURCE_DIR}:${URANIUM_DIR}")
|
||||
if(WIN32)
|
||||
set(_path_sep ";")
|
||||
else()
|
||||
set(_path_sep ":")
|
||||
endif()
|
||||
|
||||
cura_add_test(NAME pytest-main DIRECTORY ${CMAKE_SOURCE_DIR}/tests PYTHONPATH "${CMAKE_SOURCE_DIR}${_path_sep}${URANIUM_DIR}")
|
||||
|
||||
file(GLOB_RECURSE _plugins plugins/*/__init__.py)
|
||||
foreach(_plugin ${_plugins})
|
||||
get_filename_component(_plugin_directory ${_plugin} DIRECTORY)
|
||||
if(EXISTS ${_plugin_directory}/tests)
|
||||
get_filename_component(_plugin_name ${_plugin_directory} NAME)
|
||||
cura_add_test(NAME pytest-${_plugin_name} DIRECTORY ${_plugin_directory} PYTHONPATH "${_plugin_directory}:${CMAKE_SOURCE_DIR}:${URANIUM_DIR}")
|
||||
cura_add_test(NAME pytest-${_plugin_name} DIRECTORY ${_plugin_directory} PYTHONPATH "${_plugin_directory}${_path_sep}${CMAKE_SOURCE_DIR}${_path_sep}${URANIUM_DIR}")
|
||||
endif()
|
||||
endforeach()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue