[Bf-blender-cvs] [4b28cb44d59] temp-D7478-unittest-python-exe: Remove the ability of `add_python_test()` to run without `TEST_PYTHON_EXE`
Sybren A. Stüvel
noreply at git.blender.org
Fri Apr 24 10:17:04 CEST 2020
Commit: 4b28cb44d59509840a5250f62d0fa85ae7174052
Author: Sybren A. Stüvel
Date: Fri Apr 17 12:44:28 2020 +0200
Branches: temp-D7478-unittest-python-exe
https://developer.blender.org/rB4b28cb44d59509840a5250f62d0fa85ae7174052
Remove the ability of `add_python_test()` to run without `TEST_PYTHON_EXE`
Every platform should now have a value (configured by the user or detected
by CMake) for `TEST_PYTHON_EXE`, so there is no need to allow running
without. This also removes the need to have some Python files marked
as executable.
===================================================================
M tests/python/CMakeLists.txt
M tests/python/alembic_tests.py
M tests/python/cycles_render_tests.py
M tests/python/eevee_render_tests.py
M tests/python/ffmpeg_tests.py
M tests/python/opengl_draw_tests.py
M tests/python/workbench_render_tests.py
===================================================================
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt
index 4b3a1ff9c45..753bc7c5b91 100644
--- a/tests/python/CMakeLists.txt
+++ b/tests/python/CMakeLists.txt
@@ -48,18 +48,14 @@ endfunction()
# Run Python script outside Blender.
function(add_python_test testname testscript)
- if(TEST_PYTHON_EXE)
- add_test(
- NAME ${testname}
- COMMAND ${TEST_PYTHON_EXE} ${testscript} ${ARGN}
- )
- else()
- add_test(
- NAME ${testname}
- COMMAND ${testscript} ${ARGN}
- )
+ if(NOT TEST_PYTHON_EXE)
+ message(FATAL_ERROR "No Python configured for running tests, set TEST_PYTHON_EXE.")
endif()
+ add_test(
+ NAME ${testname}
+ COMMAND ${TEST_PYTHON_EXE} ${testscript} ${ARGN}
+ )
set_tests_properties(${testname} PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0)
endfunction()
diff --git a/tests/python/alembic_tests.py b/tests/python/alembic_tests.py
old mode 100755
new mode 100644
diff --git a/tests/python/cycles_render_tests.py b/tests/python/cycles_render_tests.py
old mode 100755
new mode 100644
diff --git a/tests/python/eevee_render_tests.py b/tests/python/eevee_render_tests.py
old mode 100755
new mode 100644
diff --git a/tests/python/ffmpeg_tests.py b/tests/python/ffmpeg_tests.py
old mode 100755
new mode 100644
diff --git a/tests/python/opengl_draw_tests.py b/tests/python/opengl_draw_tests.py
old mode 100755
new mode 100644
diff --git a/tests/python/workbench_render_tests.py b/tests/python/workbench_render_tests.py
old mode 100755
new mode 100644
More information about the Bf-blender-cvs
mailing list