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