1import lit.formats 2config.name = 'search-env' 3config.suffixes = ['.txt'] 4config.test_format = lit.formats.ShTest() 5config.test_source_root = None 6config.test_exec_root = None 7import lit.llvm 8lit.llvm.initialize(lit_config, config) 9import os.path 10path = os.path.realpath(os.path.join(os.path.dirname(__file__), 'test.tool')) 11lit.llvm.llvm_config.with_environment('TOOL_LOCATION', path) 12lit.llvm.llvm_config.use_llvm_tool('test-tool', search_env='TOOL_LOCATION') 13