CMake: Rename and expose 'USE_EXPERIMENTAL_TESTS' option
The `USE_EXPERIMENTAL_TESTS` variable was not exposed as an option, so the two tests that use the option to check whether tests should be run had to be manually enabled by changing `tests/python/CMakeLists.txt`. This commit renames the variable to `WITH_TESTS_EXPERIMENTAL`, defaults the option to `OFF`, and marks it as an advanced option. Pull Request: https://projects.blender.org/blender/blender/pulls/133831
This commit is contained in:
@@ -864,6 +864,14 @@ else()
|
||||
set(WITH_LINUX_OFFICIAL_RELEASE_TESTS OFF)
|
||||
endif()
|
||||
|
||||
option(WITH_TESTS_EXPERIMENTAL "\
|
||||
Run tests marked as experimental. \
|
||||
These tests are labeled as such due to long runtime, flakey results, or other issues that make them unsuitable \
|
||||
for blocking a build on."
|
||||
OFF
|
||||
)
|
||||
mark_as_advanced(WITH_TESTS_EXPERIMENTAL)
|
||||
|
||||
# Enabled by default for typical use cases to speed up development cycles. However, when looking
|
||||
# into threading or memory related issues (in dependency graph, out-of-bounds, etc) forcing single
|
||||
# test per Blender instance could give much better clues about the root of the problem.
|
||||
|
||||
@@ -4,10 +4,6 @@
|
||||
|
||||
# Use '--write-blend=/tmp/test.blend' to view output
|
||||
|
||||
# Some tests are interesting but take too long to run
|
||||
# and don't give deterministic results
|
||||
set(USE_EXPERIMENTAL_TESTS FALSE)
|
||||
|
||||
set(TEST_SRC_DIR ${CMAKE_SOURCE_DIR}/tests/data)
|
||||
set(TEST_PYTHON_DIR ${CMAKE_SOURCE_DIR}/tests/python)
|
||||
set(TEST_OUT_DIR ${CMAKE_BINARY_DIR}/tests)
|
||||
@@ -228,7 +224,7 @@ add_blender_test(
|
||||
)
|
||||
|
||||
# test running operators doesn't segfault under various conditions
|
||||
if(USE_EXPERIMENTAL_TESTS)
|
||||
if(WITH_TESTS_EXPERIMENTAL)
|
||||
add_blender_test(
|
||||
script_run_operators
|
||||
--python ${CMAKE_CURRENT_LIST_DIR}/bl_run_operators.py
|
||||
@@ -1081,7 +1077,7 @@ if(WITH_GPU_RENDER_TESTS AND TEST_SRC_DIR_EXISTS)
|
||||
set(render_tests
|
||||
)
|
||||
|
||||
if(USE_EXPERIMENTAL_TESTS)
|
||||
if(WITH_TESTS_EXPERIMENTAL)
|
||||
# The viewport tests are flakey and difficult to keep up to date for use
|
||||
# in a CI environment due to constantly changing UI, but may still be helpful
|
||||
# for local development.
|
||||
|
||||
Reference in New Issue
Block a user