Handle ASAN_OPTIONS and UBSAN_OPTIONS in TestingConfig.py
authorRafael Espindola <rafael.espindola@gmail.com>
Mon, 3 Nov 2014 23:04:56 +0000 (23:04 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Mon, 3 Nov 2014 23:04:56 +0000 (23:04 +0000)
Currently they are passed to tests of llvm itself, but not, for example, lld.

With this patch the options are visible in every test.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221198 91177308-0d34-0410-b5e6-96231b3b80d8

test/lit.cfg
utils/lit/lit/TestingConfig.py

index c5179f7a582176acce4dd8370264c8f8c226d324..40b5a25c4971098bbedb716b3edfb59ede0bf8f1 100644 (file)
@@ -95,11 +95,6 @@ for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']:
     if symbolizer in os.environ:
         config.environment[symbolizer] = os.environ[symbolizer]
 
-# Propagate options for sanitizers.
-for options in ['ASAN_OPTIONS', 'UBSAN_OPTIONS']:
-    if options in os.environ:
-        config.environment[options] = os.environ[options]
-
 # Set up OCAMLPATH to include newly built OCaml libraries.
 llvm_lib_dir = getattr(config, 'llvm_lib_dir', None)
 if not llvm_lib_dir:
index b44b366c552b6cb8ee0836249cd53edf1952be0c..4cd9486aaaad021aaf15d168d30c5f53b0c020c5 100644 (file)
@@ -23,7 +23,7 @@ class TestingConfig:
             }
 
         pass_vars = ['LIBRARY_PATH', 'LD_LIBRARY_PATH', 'SYSTEMROOT', 'TERM',
-                     'LD_PRELOAD']
+                     'LD_PRELOAD', 'ASAN_OPTIONS', 'UBSAN_OPTIONS']
         for var in pass_vars:
             environment[var] = os.environ.get(var, '')