diff options
author | Brecht Van Lommel <brecht@blender.org> | 2022-09-28 03:54:09 +0300 |
---|---|---|
committer | Brecht Van Lommel <brecht@blender.org> | 2022-09-28 04:01:47 +0300 |
commit | 788f3d72cf89c0301721a5eb2a72da07058dfa24 (patch) | |
tree | ab22199187fa1aa47fedcb7ffe44771166ee9da7 /tests/blender_as_python_module/CMakeLists.txt | |
parent | 5beaecb33e74abbdb0adb9144eee5f094ed41f9c (diff) |
Fix Python module test failing with macOS + address sanitizer
Based on patch by Ankit Meel.
Ref D10877
Diffstat (limited to 'tests/blender_as_python_module/CMakeLists.txt')
-rw-r--r-- | tests/blender_as_python_module/CMakeLists.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/blender_as_python_module/CMakeLists.txt b/tests/blender_as_python_module/CMakeLists.txt index 4f6cf0adfdb..6e0ce524903 100644 --- a/tests/blender_as_python_module/CMakeLists.txt +++ b/tests/blender_as_python_module/CMakeLists.txt @@ -10,6 +10,14 @@ function(add_blender_as_python_module_test testname testscript) NAME ${testname} COMMAND ${TEST_PYTHON_EXE} ${testscript} ${ARGN} ) + + # On macOS, asan library must be loaded early. + if(APPLE AND WITH_COMPILER_ASAN) + set_tests_properties( + ${testname} + PROPERTIES ENVIRONMENT DYLD_INSERT_LIBRARIES=${COMPILER_ASAN_LIBRARY} + ) + endif() endfunction() add_blender_as_python_module_test(import_bpy ${CMAKE_CURRENT_LIST_DIR}/import_bpy.py ${CMAKE_INSTALL_PREFIX_WITH_CONFIG}) |