Tests: also don't fail on memory leaks for gtests

This commit is contained in:
Brecht Van Lommel 2019-08-02 16:09:59 +02:00
parent 5ba070ce53
commit 256c412b31
2 changed files with 6 additions and 2 deletions

View File

@ -50,6 +50,10 @@ macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
INCLUDE_DIRECTORIES "${TEST_INC}") INCLUDE_DIRECTORIES "${TEST_INC}")
if(${DO_ADD_TEST}) if(${DO_ADD_TEST})
add_test(NAME ${NAME}_test COMMAND ${TESTS_OUTPUT_DIR}/${NAME}_test WORKING_DIRECTORY $<TARGET_FILE_DIR:blender>) add_test(NAME ${NAME}_test COMMAND ${TESTS_OUTPUT_DIR}/${NAME}_test WORKING_DIRECTORY $<TARGET_FILE_DIR:blender>)
# Don't fail tests on leaks since these often happen in external libraries
# that we can't fix.
set_tests_properties(${NAME}_test PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0)
endif() endif()
endif() endif()
endmacro() endmacro()

View File

@ -54,7 +54,7 @@ function(add_blender_test 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 LSAN_OPTIONS="exitcode=0") set_tests_properties(${testname} PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0)
endfunction() endfunction()
# Run Python script outside Blender. # Run Python script outside Blender.
@ -73,7 +73,7 @@ function(add_python_test testname testscript)
) )
endif() endif()
set_tests_properties(${testname} PROPERTIES ENVIRONMENT LSAN_OPTIONS="exitcode=0") set_tests_properties(${testname} PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0)
endfunction() endfunction()
# ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------