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

Side by Side Diff: tests_lit/lit.cfg

Issue 983533003: Use the installed/downloaded objdump instead of work-dir one. (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
1 # -*- Python -*- 1 # -*- Python -*-
2 # Taken from utils/lit/tests in the LLVM tree and hacked together to support 2 # Taken from utils/lit/tests in the LLVM tree and hacked together to support
3 # our tests. 3 # our tests.
4 # 4 #
5 # Note: This configuration has simple commands to run Subzero's translator. 5 # Note: This configuration has simple commands to run Subzero's translator.
6 # They have the form %X2i (i.e. %p2i, %l2i, and %lc2i) where X is defined 6 # They have the form %X2i (i.e. %p2i, %l2i, and %lc2i) where X is defined
7 # as follows: 7 # as follows:
8 # 8 #
9 # p : Run Subzero's translator, building ICE from PNaCl bitcode directly. 9 # p : Run Subzero's translator, building ICE from PNaCl bitcode directly.
10 # l : Run Subzero's translator, converting the .ll file to a PNaCl bitcode 10 # l : Run Subzero's translator, converting the .ll file to a PNaCl bitcode
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 # The re.sub() line is adapted from one of LLVM's lit.cfg files. 122 # The re.sub() line is adapted from one of LLVM's lit.cfg files.
123 # Extract the tool name from the pattern. This relies on the tool 123 # Extract the tool name from the pattern. This relies on the tool
124 # name being surrounded by \b word match operators. If the 124 # name being surrounded by \b word match operators. If the
125 # pattern starts with "| ", include it in the string to be 125 # pattern starts with "| ", include it in the string to be
126 # substituted. 126 # substituted.
127 substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$", 127 substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$",
128 r"\2" + llvmbinpath + "/" + r"\4", 128 r"\2" + llvmbinpath + "/" + r"\4",
129 tool) 129 tool)
130 config.substitutions.append((tool, substitution)) 130 config.substitutions.append((tool, substitution))
131 131
132 binutilsbintools = [r"\bobjdump\b",] 132 binutilsbintools = [r"\ble32-nacl-objdump\b",]
133 133
134 for tool in binutilsbintools: 134 for tool in binutilsbintools:
135 # The re.sub() line is adapted from one of LLVM's lit.cfg files. 135 # The re.sub() line is adapted from one of LLVM's lit.cfg files.
136 # Similar to the llvmbintools. 136 # Similar to the llvmbintools.
137 substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$", 137 substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$",
138 r"\2" + binutilsbinpath + "/" + r"\4", 138 r"\2" + binutilsbinpath + "/" + r"\4",
139 tool) 139 tool)
140 config.substitutions.append((tool, substitution)) 140 config.substitutions.append((tool, substitution))
141 141
142 # Add a feature to detect the Python version. 142 # Add a feature to detect the Python version.
143 config.available_features.add("python%d.%d" % (sys.version_info[0], 143 config.available_features.add("python%d.%d" % (sys.version_info[0],
144 sys.version_info[1])) 144 sys.version_info[1]))
145 145
146 # Debugging output 146 # Debugging output
147 def dbg(s): 147 def dbg(s):
148 print '[DBG] %s' % s 148 print '[DBG] %s' % s
149 149
150 dbg('bin_root = %s' % bin_root) 150 dbg('bin_root = %s' % bin_root)
151 dbg('llvmbinpath = %s' % llvmbinpath) 151 dbg('llvmbinpath = %s' % llvmbinpath)
152 dbg('binutilsbinpath = %s' % binutilsbinpath) 152 dbg('binutilsbinpath = %s' % binutilsbinpath)
153 dbg("Build attributes = %s" % pnacl_sz_atts) 153 dbg("Build attributes = %s" % pnacl_sz_atts)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698