r240314 - test: Set lit features appropriately when using asan and ubsan together

Justin Bogner mail at justinbogner.com
Mon Jun 22 11:47:10 PDT 2015


Author: bogner
Date: Mon Jun 22 13:47:10 2015
New Revision: 240314

URL: http://llvm.org/viewvc/llvm-project?rev=240314&view=rev
Log:
test: Set lit features appropriately when using asan and ubsan together

The asan/not_asan and ubsan/not_ubsan features weren't being set
correctly when LLVM_USE_SANITIZER is set to 'Address;Undefined'. Fix
this by doing substring instead of exact matching. Also simplify the
msan check for consistency.

Modified:
    cfe/trunk/test/lit.cfg

Modified: cfe/trunk/test/lit.cfg
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/lit.cfg?rev=240314&r1=240313&r2=240314&view=diff
==============================================================================
--- cfe/trunk/test/lit.cfg (original)
+++ cfe/trunk/test/lit.cfg Mon Jun 22 13:47:10 2015
@@ -452,14 +452,13 @@ if lit.util.which('xmllint'):
     config.available_features.add('xmllint')
 
 # Sanitizers.
-if config.llvm_use_sanitizer == "Address":
+if 'Address' in config.llvm_use_sanitizer:
     config.available_features.add("asan")
 else:
     config.available_features.add("not_asan")
-if (config.llvm_use_sanitizer == "Memory" or
-        config.llvm_use_sanitizer == "MemoryWithOrigins"):
+if 'Memory' in config.llvm_use_sanitizer:
     config.available_features.add("msan")
-if config.llvm_use_sanitizer == "Undefined":
+if 'Undefined' in config.llvm_use_sanitizer:
     config.available_features.add("ubsan")
 else:
     config.available_features.add("not_ubsan")





More information about the cfe-commits mailing list