Changeset View
Changeset View
Standalone View
Standalone View
tests/python/CMakeLists.txt
| Show All 35 Lines | |||||
| # Run Blender command with parameters. | # Run Blender command with parameters. | ||||
| function(add_blender_test testname) | function(add_blender_test testname) | ||||
| add_test( | add_test( | ||||
| NAME ${testname} | NAME ${testname} | ||||
| COMMAND "${TEST_BLENDER_EXE}" ${TEST_BLENDER_EXE_PARAMS} ${ARGN} | COMMAND "${TEST_BLENDER_EXE}" ${TEST_BLENDER_EXE_PARAMS} ${ARGN} | ||||
| ) | ) | ||||
| set_coverage_fixture_setup_cleanup(${testname}) | |||||
| # Don't fail tests on leaks since these often happen in external libraries | # Don't fail tests on leaks since these often happen in external libraries | ||||
| # that we can't fix. | # that we can't fix. | ||||
| set_tests_properties(${testname} PROPERTIES ENVIRONMENT | set_tests_properties(${testname} PROPERTIES ENVIRONMENT | ||||
| LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS} | "LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS};LLVM_PROFILE_FILE=${LLVM_PROFILE_FILE}" | ||||
| ) | ) | ||||
| endfunction() | endfunction() | ||||
| # Run Python script outside Blender. | # Run Python script outside Blender. | ||||
| function(add_python_test testname testscript) | function(add_python_test testname testscript) | ||||
| if(NOT TEST_PYTHON_EXE) | if(NOT TEST_PYTHON_EXE) | ||||
| message(FATAL_ERROR "No Python configured for running tests, set TEST_PYTHON_EXE.") | message(FATAL_ERROR "No Python configured for running tests, set TEST_PYTHON_EXE.") | ||||
| endif() | endif() | ||||
| add_test( | add_test( | ||||
| NAME ${testname} | NAME ${testname} | ||||
| COMMAND ${TEST_PYTHON_EXE} ${testscript} ${ARGN} | COMMAND ${TEST_PYTHON_EXE} ${testscript} ${ARGN} | ||||
| ) | ) | ||||
| set_coverage_fixture_setup_cleanup(${testname}) | |||||
| set_tests_properties(${testname} PROPERTIES ENVIRONMENT | set_tests_properties(${testname} PROPERTIES ENVIRONMENT | ||||
| LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS} | "LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS};LLVM_PROFILE_FILE=${LLVM_PROFILE_FILE}" | ||||
| ) | ) | ||||
| endfunction() | endfunction() | ||||
| # ------------------------------------------------------------------------------ | # ------------------------------------------------------------------------------ | ||||
| # GENERAL PYTHON CORRECTNESS TESTS | # GENERAL PYTHON CORRECTNESS TESTS | ||||
| add_blender_test( | add_blender_test( | ||||
| script_load_keymap | script_load_keymap | ||||
| --python ${CMAKE_CURRENT_LIST_DIR}/bl_keymap_completeness.py | --python ${CMAKE_CURRENT_LIST_DIR}/bl_keymap_completeness.py | ||||
| ▲ Show 20 Lines • Show All 762 Lines • Show Last 20 Lines | |||||