diff --git a/tests/python/CMakeLists.txt b/tests/python/CMakeLists.txt index eb34102b3b6..47d19c6e141 100644 --- a/tests/python/CMakeLists.txt +++ b/tests/python/CMakeLists.txt @@ -1119,10 +1119,18 @@ add_subdirectory(collada) if(WITH_LINUX_OFFICIAL_RELEASE_TESTS) get_filename_component(release_root_folder ${TEST_BLENDER_EXE} DIRECTORY) + set(extra_args "") + if(WITH_COMPILER_ASAN) + set(extra_args + ${extra_args} + --sanitizer-build + ) + endif() add_python_test( linux_release_sanity_checks ${CMAKE_SOURCE_DIR}/tools/check_blender_release/check_release.py - -- ${release_root_folder} + -- --directory "${release_root_folder}" ${extra_args} ) + unset(extra_args) unset(release_root_folder) endif() diff --git a/tools/check_blender_release/check_static_binaries.py b/tools/check_blender_release/check_static_binaries.py index 1ed26045d9c..5f46bd146cd 100644 --- a/tools/check_blender_release/check_static_binaries.py +++ b/tools/check_blender_release/check_static_binaries.py @@ -196,6 +196,12 @@ class UnitTesting(unittest.TestCase): self.assertTrue(os.path.isdir(args.directory), "Given path is not a directory: {}" . format(args.directory)) + # Add sanitizer libraries if needed. + if args.is_sanitizer_build: + ALLOWED_LIBS.extend([ + "libasan.so", + "libubsan.so", + ]) # Add all libraries the we bundle to the allowed list ALLOWED_LIBS.extend(glob.glob("*.so", root_dir=args.directory + "/lib")) # Add OIDN libs that do not have an `.so` symbolic-link. diff --git a/tools/check_blender_release/check_utils.py b/tools/check_blender_release/check_utils.py index ac6c6d9549f..5b110f5caa2 100644 --- a/tools/check_blender_release/check_utils.py +++ b/tools/check_blender_release/check_utils.py @@ -36,7 +36,13 @@ def parseArguments(): # Construct argument parser. parser = argparse.ArgumentParser(description="Static binary checker") - parser.add_argument('directory', help='Directories to check') + parser.add_argument('--directory', help='Directories to check') + # ASAN builds link additional libraries, so check_static_binaries.py needs to know about it. + parser.add_argument( + '--sanitizer-build', + dest='is_sanitizer_build', + action='store_true', + help='Whether the checked binaries were built with the sanitizer option (`WITH_COMPILER_ASAN` CMake option)') # Parse arguments which are not handled by unit testing framework. unittest_args, parser_args = sliceCommandLineArguments() args = parser.parse_args(args=parser_args)