OLD | NEW |
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 sys | 7 import sys |
8 | 8 |
9 import lit.formats | 9 import lit.formats |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 src_root = os.path.abspath(os.path.join(config.test_source_root, '..')) | 25 src_root = os.path.abspath(os.path.join(config.test_source_root, '..')) |
26 bin_root = src_root | 26 bin_root = src_root |
27 config.substitutions.append(('%{src_root}', src_root)) | 27 config.substitutions.append(('%{src_root}', src_root)) |
28 config.substitutions.append(('%{python}', sys.executable)) | 28 config.substitutions.append(('%{python}', sys.executable)) |
29 | 29 |
30 # Finding LLVM binary tools. All tools used in the tests must be listed in | 30 # Finding LLVM binary tools. All tools used in the tests must be listed in |
31 # the llvmbintools list. | 31 # the llvmbintools list. |
32 llvmbinpath = os.path.abspath(os.environ.get('LLVM_BIN_PATH')) | 32 llvmbinpath = os.path.abspath(os.environ.get('LLVM_BIN_PATH')) |
33 | 33 |
34 # Finding Subzero tools | 34 # Finding Subzero tools |
35 config.substitutions.append(('%llvm2ice', os.path.join(bin_root, 'llvm2ice'))) | 35 llvm2icetool = os.path.join(bin_root, 'llvm2ice') |
| 36 config.substitutions.append( |
| 37 ('%llvm2iceinsts', ' '.join([os.path.join(bin_root, 'llvm2iceinsts.py'), |
| 38 '--llvm2ice', llvm2icetool, |
| 39 '--llvm-bin-path', llvmbinpath |
| 40 ]))) |
| 41 config.substitutions.append(('%llvm2ice', llvm2icetool)) |
36 config.substitutions.append(('%szdiff', os.path.join(bin_root, 'szdiff.py'))) | 42 config.substitutions.append(('%szdiff', os.path.join(bin_root, 'szdiff.py'))) |
37 | 43 |
38 llvmbintools = ['FileCheck'] | 44 llvmbintools = ['FileCheck'] |
39 | 45 |
40 for tool in llvmbintools: | 46 for tool in llvmbintools: |
41 config.substitutions.append((tool, os.path.join(llvmbinpath, tool))) | 47 config.substitutions.append((tool, os.path.join(llvmbinpath, tool))) |
42 | 48 |
43 # Add a feature to detect the Python version. | 49 # Add a feature to detect the Python version. |
44 config.available_features.add("python%d.%d" % (sys.version_info[0], | 50 config.available_features.add("python%d.%d" % (sys.version_info[0], |
45 sys.version_info[1])) | 51 sys.version_info[1])) |
46 | 52 |
47 # Debugging output | 53 # Debugging output |
48 def dbg(s): | 54 def dbg(s): |
49 print '[DBG] %s' % s | 55 print '[DBG] %s' % s |
50 | 56 |
51 dbg('bin_root = %s' % bin_root) | 57 dbg('bin_root = %s' % bin_root) |
52 dbg('llvmbinpath = %s' % llvmbinpath) | 58 dbg('llvmbinpath = %s' % llvmbinpath) |
53 | 59 |
54 | 60 |
OLD | NEW |