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

Side by Side Diff: tests_lit/lit.cfg

Issue 415583003: Add llvm-mc to the set of commands lit knows about. (Closed) Base URL: https://gerrit.chromium.org/gerrit/p/native_client/pnacl-subzero.git@master
Patch Set: Created 6 years, 4 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Taken from utils/lit/tests in the LLVM tree and hacked together to support 1 # Taken from utils/lit/tests in the LLVM tree and hacked together to support
2 # our tests. 2 # our tests.
3 3
4 # -*- Python -*- 4 # -*- Python -*-
5 5
6 import os 6 import os
7 import re 7 import re
8 import sys 8 import sys
9 9
10 import lit.formats 10 import lit.formats
(...skipping 24 matching lines...) Expand all
35 # Finding Subzero tools 35 # Finding Subzero tools
36 llvm2icetool = os.path.join(bin_root, 'llvm2ice') 36 llvm2icetool = os.path.join(bin_root, 'llvm2ice')
37 config.substitutions.append( 37 config.substitutions.append(
38 ('%llvm2iceinsts', ' '.join([os.path.join(bin_root, 'llvm2iceinsts.py'), 38 ('%llvm2iceinsts', ' '.join([os.path.join(bin_root, 'llvm2iceinsts.py'),
39 '--llvm2ice', llvm2icetool, 39 '--llvm2ice', llvm2icetool,
40 '--llvm-bin-path', llvmbinpath 40 '--llvm-bin-path', llvmbinpath
41 ]))) 41 ])))
42 config.substitutions.append(('%llvm2ice', llvm2icetool)) 42 config.substitutions.append(('%llvm2ice', llvm2icetool))
43 config.substitutions.append(('%szdiff', os.path.join(bin_root, 'szdiff.py'))) 43 config.substitutions.append(('%szdiff', os.path.join(bin_root, 'szdiff.py')))
44 44
45 llvmbintools = [r"\bFileCheck\b", r"\bnot\b"] 45 llvmbintools = [r"\bFileCheck\b", r"\bllvm-mc\b", r"\bnot\b"]
46 46
47 for tool in llvmbintools: 47 for tool in llvmbintools:
48 # The re.sub() line is adapted from one of LLVM's lit.cfg files. 48 # The re.sub() line is adapted from one of LLVM's lit.cfg files.
49 # Extract the tool name from the pattern. This relies on the tool 49 # Extract the tool name from the pattern. This relies on the tool
50 # name being surrounded by \b word match operators. If the 50 # name being surrounded by \b word match operators. If the
51 # pattern starts with "| ", include it in the string to be 51 # pattern starts with "| ", include it in the string to be
52 # substituted. 52 # substituted.
53 substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$", 53 substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$",
54 r"\2" + llvmbinpath + "/" + r"\4", 54 r"\2" + llvmbinpath + "/" + r"\4",
55 tool) 55 tool)
56 config.substitutions.append((tool, substitution)) 56 config.substitutions.append((tool, substitution))
57 57
58 # Add a feature to detect the Python version. 58 # Add a feature to detect the Python version.
59 config.available_features.add("python%d.%d" % (sys.version_info[0], 59 config.available_features.add("python%d.%d" % (sys.version_info[0],
60 sys.version_info[1])) 60 sys.version_info[1]))
61 61
62 # Debugging output 62 # Debugging output
63 def dbg(s): 63 def dbg(s):
64 print '[DBG] %s' % s 64 print '[DBG] %s' % s
65 65
66 dbg('bin_root = %s' % bin_root) 66 dbg('bin_root = %s' % bin_root)
67 dbg('llvmbinpath = %s' % llvmbinpath) 67 dbg('llvmbinpath = %s' % llvmbinpath)
OLDNEW
« 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