[Bf-blender-cvs] [a181b156399] master: Tests: use environment variable for leak sanitizer

Ankit Meel noreply at git.blender.org
Wed Oct 14 13:47:55 CEST 2020


Commit: a181b156399a13fa429159112e30c8005d5e8a59
Author: Ankit Meel
Date:   Wed Oct 14 12:32:35 2020 +0530
Branches: master
https://developer.blender.org/rBa181b156399a13fa429159112e30c8005d5e8a59

Tests: use environment variable for leak sanitizer

Don't override other `LSAN_OPTIONS` like suppression file set in
the environment variable.

Old code added in {rB38ff5064b33ccb8} and {rB5f4e99b7a2b8376}

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D9207

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

M	tests/python/CMakeLists.txt

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

diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt
index 7bfc1154ed4..9ff44ac8fe9 100644
--- a/tests/python/CMakeLists.txt
+++ b/tests/python/CMakeLists.txt
@@ -43,7 +43,9 @@ 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:$ENV{LSAN_OPTIONS}
+  )
 endfunction()
 
 # Run Python script outside Blender.
@@ -56,7 +58,9 @@ function(add_python_test testname testscript)
     NAME ${testname}
     COMMAND ${TEST_PYTHON_EXE} ${testscript} ${ARGN}
   )
-  set_tests_properties(${testname} PROPERTIES ENVIRONMENT LSAN_OPTIONS=exitcode=0)
+  set_tests_properties(${testname} PROPERTIES ENVIRONMENT
+    LSAN_OPTIONS=exitcode=0:$ENV{LSAN_OPTIONS}
+  )
 endfunction()
 
 # ------------------------------------------------------------------------------



More information about the Bf-blender-cvs mailing list