2010-08-02 00:39:42 +00:00
|
|
|
#!/usr/bin/env python
|
|
|
|
|
|
|
|
import os
|
|
|
|
import sys
|
|
|
|
|
|
|
|
# Variables configured at build time.
|
|
|
|
llvm_source_root = "@LLVM_SOURCE_DIR@"
|
|
|
|
llvm_obj_root = "@LLVM_BINARY_DIR@"
|
|
|
|
|
|
|
|
# Make sure we can find the lit package.
|
2012-04-19 16:31:08 +00:00
|
|
|
sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))
|
2010-08-02 00:39:42 +00:00
|
|
|
|
|
|
|
# Set up some builtin parameters, so that by default the LLVM test suite
|
|
|
|
# configuration file knows how to find the object tree.
|
|
|
|
builtin_parameters = {
|
2011-02-09 04:18:02 +00:00
|
|
|
'build_config' : "@CMAKE_CFG_INTDIR@",
|
|
|
|
'build_mode' : "@RUNTIME_BUILD_MODE@",
|
2010-08-02 00:39:42 +00:00
|
|
|
'llvm_site_config' : os.path.join(llvm_obj_root, 'test', 'lit.site.cfg')
|
|
|
|
}
|
|
|
|
|
2012-04-19 16:31:08 +00:00
|
|
|
clang_site_config = os.path.join(llvm_obj_root, 'tools', 'clang', 'test',
|
|
|
|
'lit.site.cfg')
|
2011-02-09 04:17:54 +00:00
|
|
|
if os.path.exists(clang_site_config):
|
|
|
|
builtin_parameters['clang_site_config'] = clang_site_config
|
|
|
|
|
2010-08-02 00:39:42 +00:00
|
|
|
if __name__=='__main__':
|
|
|
|
import lit
|
|
|
|
lit.main(builtin_parameters)
|