From 8957f7996c5c0725730202d73c1aae803944773b Mon Sep 17 00:00:00 2001 From: Alexey Samsonov Date: Fri, 15 Mar 2013 07:27:49 +0000 Subject: [PATCH] Fixup for r176933: more careful setup of path to llvm-symbolizer git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@177144 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/Unit/lit.cfg | 6 ++++-- test/lit.cfg | 9 ++++----- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/Unit/lit.cfg b/test/Unit/lit.cfg index 1f6fce89127..8dc7853d913 100644 --- a/test/Unit/lit.cfg +++ b/test/Unit/lit.cfg @@ -84,5 +84,7 @@ if config.enable_shared: # Setup paths to llvm-symbolizer for Sanitizer tools. llvm_tools_dir = getattr(config, 'llvm_tools_dir', None) -config.environment['ASAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer' -config.environment['MSAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer' +if llvm_tools_dir: + llvm_symbolizer_path = os.path.join(llvm_tools_dir, 'llvm-symbolizer') + config.environment['ASAN_SYMBOLIZER_PATH'] = llvm_symbolizer_path + config.environment['MSAN_SYMBOLIZER_PATH'] = llvm_symbolizer_path diff --git a/test/lit.cfg b/test/lit.cfg index 4953bddf2da..8ee2078b696 100644 --- a/test/lit.cfg +++ b/test/lit.cfg @@ -63,6 +63,10 @@ if llvm_obj_root is not None: lit.fatal('No LLVM tools dir set!') path = os.path.pathsep.join((llvm_tools_dir, config.environment['PATH'])) config.environment['PATH'] = path + # Setup paths to llvm-symbolizer for Sanitizer tools. + llvm_symbolizer_path = os.path.join(llvm_tools_dir, 'llvm-symbolizer') + config.environment['ASAN_SYMBOLIZER_PATH'] = llvm_symbolizer_path + config.environment['MSAN_SYMBOLIZER_PATH'] = llvm_symbolizer_path # Propagate 'HOME' through the environment. if 'HOME' in os.environ: @@ -90,11 +94,6 @@ config.environment['LLVM_SRC_ROOT'] = getattr(config, 'llvm_src_root', '') config.environment['PYTHON_EXECUTABLE'] = getattr(config, 'python_executable', '') -# Setup paths to llvm-symbolizer for Sanitizer tools. -llvm_tools_dir = getattr(config, 'llvm_tools_dir', None) -config.environment['ASAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer' -config.environment['MSAN_SYMBOLIZER_PATH'] = llvm_tools_dir + '/llvm-symbolizer' - ### import os