[Bf-blender-cvs] [0270941b70d] master: Merge branch 'blender-v2.83-release'
Campbell Barton
noreply at git.blender.org
Mon May 25 13:44:16 CEST 2020
Commit: 0270941b70d56480310c0d0e38053d5b426f6821
Author: Campbell Barton
Date: Mon May 25 21:43:54 2020 +1000
Branches: master
https://developer.blender.org/rB0270941b70d56480310c0d0e38053d5b426f6821
Merge branch 'blender-v2.83-release'
===================================================================
===================================================================
diff --cc tests/CMakeLists.txt
index 80d749c7040,8f6edcff482..0ee3b500fdf
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@@ -14,27 -14,19 +14,31 @@@ endif(
# Path to Blender and Python executables for all platforms.
if(MSVC)
set(TEST_BLENDER_EXE ${TEST_INSTALL_DIR}/blender.exe)
- set(TEST_PYTHON_EXE "${TEST_INSTALL_DIR}/${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}/python/bin/python$<$<CONFIG:Debug>:_d>")
+ set(_default_test_python_exe "${TEST_INSTALL_DIR}/${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}/python/bin/python$<$<CONFIG:Debug>:_d>")
elseif(APPLE)
set(TEST_BLENDER_EXE ${TEST_INSTALL_DIR}/Blender.app/Contents/MacOS/Blender)
- set(TEST_PYTHON_EXE)
+ set(_default_test_python_exe ${PYTHON_EXECUTABLE})
else()
- set(TEST_BLENDER_EXE ${TEST_INSTALL_DIR}/blender)
+ if(WITH_INSTALL_PORTABLE)
+ set(TEST_BLENDER_EXE ${TEST_INSTALL_DIR}/blender)
+ else()
+ set(TEST_BLENDER_EXE ${TEST_INSTALL_DIR}/bin/blender)
+ endif()
- set(TEST_PYTHON_EXE)
+ set(_default_test_python_exe ${PYTHON_EXECUTABLE})
endif()
+# The installation directory's Python is the best one to use. However, it can only be there after the install step,
+# which means that Python will never be there on a fresh system. To suit different needs, the user can pass
+# -DTEST_PYTHON_EXE=/path/to/python to CMake.
+if (NOT TEST_PYTHON_EXE)
+ set(TEST_PYTHON_EXE ${_default_test_python_exe})
+ message(STATUS "Tests: Using Python executable: ${TEST_PYTHON_EXE}")
+elseif(NOT EXISTS ${TEST_PYTHON_EXE})
+ message(FATAL_ERROR "Tests: TEST_PYTHON_EXE ${TEST_PYTHON_EXE} does not exist")
+endif()
+unset(_default_test_python_exe)
+
+
# For testing with Valgrind
# set(TEST_BLENDER_EXE valgrind --track-origins=yes --error-limit=no ${TEST_BLENDER_EXE})
More information about the Bf-blender-cvs
mailing list