Author: dergachev Date: Mon Oct 15 10:43:23 2018 New Revision: 344537 URL: http://llvm.org/viewvc/llvm-project?rev=344537&view=rev Log: [python] [tests] Disable python binding tests under LLVM_USE_SANITIZER=Address
They don't work yet. Patch by Dan Liew! rdar://problem/45242886 Differential Revision: https://reviews.llvm.org/D53239 Modified: cfe/trunk/bindings/python/tests/CMakeLists.txt Modified: cfe/trunk/bindings/python/tests/CMakeLists.txt URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/bindings/python/tests/CMakeLists.txt?rev=344537&r1=344536&r2=344537&view=diff ============================================================================== --- cfe/trunk/bindings/python/tests/CMakeLists.txt (original) +++ cfe/trunk/bindings/python/tests/CMakeLists.txt Mon Oct 15 10:43:23 2018 @@ -7,9 +7,24 @@ add_custom_target(check-clang-python DEPENDS libclang WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/..) +# Check if we are building with ASan +list(FIND LLVM_USE_SANITIZER "Address" LLVM_USE_ASAN_INDEX) +if (LLVM_USE_ASAN_INDEX EQUAL -1) + set(LLVM_USE_ASAN FALSE) +else() + set(LLVM_USE_ASAN TRUE) +endif() + # Tests fail on Windows, and need someone knowledgeable to fix. # It's not clear whether it's a test or a valid binding problem. -if(NOT WIN32) +# +# Do not try to run if libclang was built with ASan because +# the sanitizer library will likely be loaded too late to perform +# interception and will then fail. +# We could use LD_PRELOAD/DYLD_INSERT_LIBRARIES but this isn't +# portable so its easier just to not run the tests when building +# with ASan. +if((NOT WIN32) AND (NOT LLVM_USE_ASAN)) set_property(GLOBAL APPEND PROPERTY LLVM_ADDITIONAL_TEST_TARGETS check-clang-python) endif() _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits