• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1#!/usr/bin/env python
2
3import os
4import sys
5
6# Variables configured at build time.
7llvm_source_root = "@LLVM_SOURCE_DIR@"
8llvm_obj_root = "@LLVM_BINARY_DIR@"
9
10# Make sure we can find the lit package.
11sys.path.append(os.path.join(llvm_source_root, 'utils', 'lit'))
12
13# Set up some builtin parameters, so that by default the LLVM test suite
14# configuration file knows how to find the object tree.
15builtin_parameters = {
16    'build_config' : "@CMAKE_CFG_INTDIR@",
17    'build_mode' : "@RUNTIME_BUILD_MODE@",
18    'llvm_site_config' : os.path.join(llvm_obj_root, 'test', 'lit.site.cfg')
19    }
20
21clang_site_config = os.path.join(llvm_obj_root, 'tools', 'clang', 'test', 'lit.site.cfg')
22if os.path.exists(clang_site_config):
23    builtin_parameters['clang_site_config'] = clang_site_config
24
25if __name__=='__main__':
26    import lit
27    lit.main(builtin_parameters)
28