summaryrefslogtreecommitdiffstats
path: root/test/lit.cfg.py
diff options
context:
space:
mode:
authorVedant Kumar <vsk@apple.com>2017-09-22 18:42:28 +0000
committerVedant Kumar <vsk@apple.com>2017-09-22 18:42:28 +0000
commit44655e1e708397b4b90d0b17810bc8882acea7b5 (patch)
tree3a355afd378b06e093d7b7525aace772e41e2759 /test/lit.cfg.py
parentcc76a8176ee9da9a1c3a5ede43d606b9c727b1ce (diff)
[lit.cfg] Avoid concatenating which(clang-func-mapping) if it's missing
This un-breaks a lit workflow where you run lit tests from a test sub-directory within clang without first building clang-func-mapping. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@314013 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/lit.cfg.py')
-rw-r--r--test/lit.cfg.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/lit.cfg.py b/test/lit.cfg.py
index 4f419f11e2..a600f2d9b8 100644
--- a/test/lit.cfg.py
+++ b/test/lit.cfg.py
@@ -125,7 +125,11 @@ config.substitutions.append( ('%clang_cl', ' ' + config.clang +
' --driver-mode=cl '))
config.substitutions.append( ('%clangxx', ' ' + config.clang +
' --driver-mode=g++ '))
-config.substitutions.append( ('%clang_func_map', ' ' + lit.util.which('clang-func-mapping', config.environment['PATH']) + ' ') )
+
+clang_func_map = lit.util.which('clang-func-mapping', config.environment['PATH'])
+if clang_func_map:
+ config.substitutions.append( ('%clang_func_map', ' ' + clang_func_map + ' ') )
+
config.substitutions.append( ('%clang', ' ' + config.clang + ' ') )
config.substitutions.append( ('%test_debuginfo',
' ' + config.llvm_src_root + '/utils/test_debuginfo.pl ') )