| 1 |
import lit.formats |
| 2 |
import lit.util |
| 3 |
|
| 4 |
config.name = "use-llvm-tool" |
| 5 |
config.suffixes = [".txt"] |
| 6 |
config.test_format = lit.formats.ShTest() |
| 7 |
config.test_source_root = None |
| 8 |
config.test_exec_root = None |
| 9 |
import os.path |
| 10 |
|
| 11 |
this_dir = os.path.dirname(lit.util.abs_path_preserve_drive(__file__)) |
| 12 |
config.llvm_tools_dir = os.path.join(this_dir, "build") |
| 13 |
import lit.llvm |
| 14 |
|
| 15 |
lit.llvm.initialize(lit_config, config) |
| 16 |
lit.llvm.llvm_config.with_environment("CASE1", os.path.join(this_dir, "env-case1")) |
| 17 |
lit.llvm.llvm_config.with_environment("CASE6", os.path.join(this_dir, "env-case6")) |
| 18 |
lit.llvm.llvm_config.with_environment( |
| 19 |
"PATH", os.path.join(this_dir, "path"), append_path=True |
| 20 |
) |
| 21 |
lit.llvm.llvm_config.use_llvm_tool("case1", search_env="CASE1") |
| 22 |
lit.llvm.llvm_config.use_llvm_tool("case2", search_env="CASE2") |
| 23 |
lit.llvm.llvm_config.use_llvm_tool("case3") |
| 24 |
lit.llvm.llvm_config.use_llvm_tool("case4", use_installed=True) |
| 25 |
lit.llvm.llvm_config.use_llvm_tool("case5") |
| 26 |
lit.llvm.llvm_config.use_llvm_tool("case6", search_env="CASE6", use_installed=True) |
| 27 |
lit.llvm.llvm_config.use_llvm_tool("case7", use_installed=True) |
| 28 |
lit.llvm.llvm_config.use_llvm_tool("case8", use_installed=True) |
| 29 |
paths = [ |
| 30 |
os.path.join(this_dir, "search1"), |
| 31 |
os.path.join(this_dir, "search2"), |
| 32 |
os.path.join(this_dir, "search3"), |
| 33 |
] |
| 34 |
lit.llvm.llvm_config.use_llvm_tool("case9", search_paths=paths) |
| 35 |
lit.llvm.llvm_config.use_llvm_tool("case10", search_paths=paths, use_installed=True) |