From 5f4e99b7a2b8376231baf26f76ea5407579b14e4 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 2 Aug 2019 15:19:59 +0200 Subject: Fix broken add_python_test after recent changes --- tests/python/CMakeLists.txt | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'tests') 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 "$" ${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 "$/${BLENDER_VERSION_MAJOR}.${BLENDER_VERSION_MINOR}/python/bin/python$<$:_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() # ------------------------------------------------------------------------------ -- cgit v1.2.3