Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 import re | |
| 2 import lit.formats | |
| 3 | |
| 4 # Find FindBaseNaCl in utils.py in ../pydir/ . | |
| 5 sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)) + '/pydir') | |
| 6 from utils import FindBaseNaCl | |
| 7 | |
| 8 config.name = 'subzero_crosstests' | |
| 9 config.test_format = lit.formats.ShTest() | |
| 10 config.suffixes = ['.xtest'] | |
| 11 config.test_source_root = os.path.dirname(__file__) | |
| 12 config.test_exec_root = config.test_source_root | |
| 13 | |
| 14 llvmbintools = [r"\bFileCheck\b"] | |
| 15 llvmbinpath = ('{root}/toolchain_build/out/llvm_x86_64_linux_work/' + | |
| 16 'Release+Asserts/bin').format(root=FindBaseNaCl()) | |
|
Mircea Trofin
2015/03/08 16:23:30
The path (llvm_x86_64_linux_work/Release+Asserts)
Jim Stichnoth
2015/03/09 18:16:16
Good point. Changing this to be like the other li
| |
| 17 | |
| 18 for tool in llvmbintools: | |
| 19 # The re.sub() line is adapted from one of LLVM's lit.cfg files. | |
| 20 # Extract the tool name from the pattern. This relies on the tool | |
| 21 # name being surrounded by \b word match operators. If the | |
| 22 # pattern starts with "| ", include it in the string to be | |
| 23 # substituted. | |
| 24 substitution = re.sub(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$", | |
| 25 r"\2" + llvmbinpath + "/" + r"\4", | |
| 26 tool) | |
| 27 config.substitutions.append((tool, substitution)) | |
| OLD | NEW |