Commit: 256c412b316755a9d6c0ad94b3e3139b27a27476
Author: Brecht Van Lommel
Date:   Fri Aug 2 16:09:59 2019 +0200
Branches: master
https://developer.blender.org/rB256c412b316755a9d6c0ad94b3e3139b27a27476

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

===================================================================

M       build_files/cmake/Modules/GTestTesting.cmake
M       tests/python/CMakeLists.txt

===================================================================

diff --git a/build_files/cmake/Modules/GTestTesting.cmake 
b/build_files/cmake/Modules/GTestTesting.cmake
index eb06e00bf9e..47edbdf37a6 100644
--- a/build_files/cmake/Modules/GTestTesting.cmake
+++ b/build_files/cmake/Modules/GTestTesting.cmake
@@ -50,6 +50,10 @@ macro(BLENDER_SRC_GTEST_EX NAME SRC EXTRA_LIBS DO_ADD_TEST)
                           INCLUDE_DIRECTORIES              "${TEST_INC}")
     if(${DO_ADD_TEST})
       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()
 endmacro()
diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt
index 44bdce954b1..4793010885e 100644
--- a/tests/python/CMakeLists.txt
+++ b/tests/python/CMakeLists.txt
@@ -54,7 +54,7 @@ function(add_blender_test testname)
 
   # Don't fail tests on leaks since these often happen in external libraries
   # 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()
 
 # Run Python script outside Blender.
@@ -73,7 +73,7 @@ function(add_python_test testname testscript)
     )
   endif()
 
-  set_tests_properties(${testname} PROPERTIES ENVIRONMENT 
LSAN_OPTIONS="exitcode=0")
+  set_tests_properties(${testname} PROPERTIES ENVIRONMENT 
LSAN_OPTIONS=exitcode=0)
 endfunction()
 
 # 
------------------------------------------------------------------------------

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to