| Index: tests_lit/lit.cfg
 | 
| diff --git a/tests_lit/lit.cfg b/tests_lit/lit.cfg
 | 
| index d1d15bfba793c48733dc0bdc19d0f2e102d56f44..febb99d223f3a2d30f6c3c3a308e7f7d6d0e515a 100644
 | 
| --- a/tests_lit/lit.cfg
 | 
| +++ b/tests_lit/lit.cfg
 | 
| @@ -4,6 +4,7 @@
 | 
|  # -*- Python -*-
 | 
|  
 | 
|  import os
 | 
| +import re
 | 
|  import sys
 | 
|  
 | 
|  import lit.formats
 | 
| @@ -41,10 +42,18 @@ config.substitutions.append(
 | 
|  config.substitutions.append(('%llvm2ice', llvm2icetool))
 | 
|  config.substitutions.append(('%szdiff', os.path.join(bin_root, 'szdiff.py')))
 | 
|  
 | 
| -llvmbintools = ['FileCheck']
 | 
| +llvmbintools = [r"\bFileCheck\b", r"\bnot\b"]
 | 
|  
 | 
|  for tool in llvmbintools:
 | 
| -  config.substitutions.append((tool, os.path.join(llvmbinpath, tool)))
 | 
| +  # The re.sub() line is adapted from one of LLVM's lit.cfg files.
 | 
| +  # Extract the tool name from the pattern.  This relies on the tool
 | 
| +  # name being surrounded by \b word match operators.  If the
 | 
| +  # pattern starts with "| ", include it in the string to be
 | 
| +  # substituted.
 | 
| +  substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$",
 | 
| +                        r"\2" + llvmbinpath + "/" + r"\4",
 | 
| +                        tool)
 | 
| +  config.substitutions.append((tool, substitution))
 | 
|  
 | 
|  # Add a feature to detect the Python version.
 | 
|  config.available_features.add("python%d.%d" % (sys.version_info[0],
 | 
| @@ -56,5 +65,3 @@ def dbg(s):
 | 
|  
 | 
|  dbg('bin_root = %s' % bin_root)
 | 
|  dbg('llvmbinpath = %s' % llvmbinpath)
 | 
| -
 | 
| -
 | 
| 
 |