diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-02 16:19:59 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-08-02 16:45:01 +0300 |
commit | 5f4e99b7a2b8376231baf26f76ea5407579b14e4 (patch) | |
tree | 1c960d49050aec71c86372726bbec62881da8586 /tests | |
parent | ab3de09591c74fe43b6f3f81bfc666a7beb9cc70 (diff) |
Fix broken add_python_test after recent changes
Diffstat (limited to 'tests')
-rw-r--r-- | tests/python/CMakeLists.txt | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index 0d64aca3c1d..44bdce954b1 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -46,30 +46,34 @@ endif() # set(TEST_BLENDER_EXE ${TEST_BLENDER_EXE} ${TEST_BLENDER_EXE_PARAMS} ) # Run Blender command with parameters. -function(add_blender_test name) +function(add_blender_test testname) add_test( - NAME ${name} + NAME ${testname} COMMAND "$<TARGET_FILE:blender>" ${TEST_BLENDER_EXE_PARAMS} ${ARGN} ) # Don't fail tests on leaks since these often happen in external libraries # that we can't fix. - set_tests_properties(${name} PROPERTIES ENVIRONMENT LSAN_OPTIONS="exitcode=0") + set_tests_properties(${testname} PROPERTIES ENVIRONMENT LSAN_OPTIONS="exitcode=0") endfunction() # Run Python script outside Blender. function(add_python_test testname testscript) if(MSVC) - add_blender_test( - ${testname} + add_test( + NAME ${testname} + COMMAND "$<TARGET_FILE_DIR:blender>/${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}/python/bin/python$<$<CONFIG:Debug>:_d>" ${testscript} ${ARGN} ) else() - add_blender_test( - ${testname} + add_test( + NAME ${testname} + COMMAND ${testscript} ${ARGN} ) endif() + + set_tests_properties(${testname} PROPERTIES ENVIRONMENT LSAN_OPTIONS="exitcode=0") endfunction() # ------------------------------------------------------------------------------ |