Chromium Code Reviews| Index: crosstest/lit.cfg |
| diff --git a/crosstest/lit.cfg b/crosstest/lit.cfg |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..91c390a7943bf3a57b7daeb6299b86d1fcf574bc |
| --- /dev/null |
| +++ b/crosstest/lit.cfg |
| @@ -0,0 +1,27 @@ |
| +import re |
| +import lit.formats |
| + |
| +# Find FindBaseNaCl in utils.py in ../pydir/ . |
| +sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)) + '/pydir') |
| +from utils import FindBaseNaCl |
| + |
| +config.name = 'subzero_crosstests' |
| +config.test_format = lit.formats.ShTest() |
| +config.suffixes = ['.xtest'] |
| +config.test_source_root = os.path.dirname(__file__) |
| +config.test_exec_root = config.test_source_root |
| + |
| +llvmbintools = [r"\bFileCheck\b"] |
| +llvmbinpath = ('{root}/toolchain_build/out/llvm_x86_64_linux_work/' + |
| + '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
|
| + |
| +for tool in llvmbintools: |
| + # 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)) |