Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(267)

Unified Diff: tests_lit/lit.cfg

Issue 344063004: Subzero: Add 'not' to the list of LLVM commands in lit.cfg. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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)
-
-
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698