From e2c772a1b06b9f202e56e466696fdc25463210ed Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Thu, 4 Apr 2013 07:41:00 +0000 Subject: [PATCH] Propagate path to ASan/MSan symbolizer into test environment to produce useful reports on errors. llvm-svn: 178749 --- llvm/test/Unit/lit.cfg | 5 +++++ llvm/test/lit.cfg | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/llvm/test/Unit/lit.cfg b/llvm/test/Unit/lit.cfg index ba4cbc5d7980..15cf626c72bf 100644 --- a/llvm/test/Unit/lit.cfg +++ b/llvm/test/Unit/lit.cfg @@ -28,6 +28,11 @@ if 'TMP' in os.environ: if 'TEMP' in os.environ: config.environment['TEMP'] = os.environ['TEMP'] +# Propagate path to symbolizer for ASan/MSan. +for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']: + if symbolizer in os.environ: + config.environment[symbolizer] = os.environ[symbolizer] + ### # Check that the object root is known. diff --git a/llvm/test/lit.cfg b/llvm/test/lit.cfg index 216e3c1aa0d2..0ecd8feb26a2 100644 --- a/llvm/test/lit.cfg +++ b/llvm/test/lit.cfg @@ -90,6 +90,11 @@ config.environment['LLVM_SRC_ROOT'] = getattr(config, 'llvm_src_root', '') config.environment['PYTHON_EXECUTABLE'] = getattr(config, 'python_executable', '') +# Propagate path to symbolizer for ASan/MSan. +for symbolizer in ['ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH']: + if symbolizer in os.environ: + config.environment[symbolizer] = os.environ[symbolizer] + ### import os