File: llvm-lit.in

package info (click to toggle)
llvm-toolchain-3.4 1%3A3.4.2-13
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 253,236 kB
  • ctags: 276,203
  • sloc: cpp: 1,665,580; ansic: 298,647; asm: 206,157; objc: 84,350; python: 73,119; sh: 23,466; perl: 5,679; makefile: 5,542; ml: 5,250; pascal: 2,467; lisp: 1,420; xml: 679; cs: 236; csh: 117
file content (32 lines) | stat: -rwxr-xr-x 1,099 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/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.
sys.path.insert(0, os.path.join(llvm_source_root, 'utils', 'lit'))

# Set up some builtin parameters, so that by default the LLVM test suite
# configuration file knows how to find the object tree.
builtin_parameters = {
    'build_mode' : "@CMAKE_CFG_INTDIR@",
    'llvm_site_config' : os.path.join(llvm_obj_root, 'test', 'lit.site.cfg')
    }

clang_obj_root = os.path.join(llvm_obj_root, 'tools', 'clang')

if os.path.exists(clang_obj_root):
    builtin_parameters['clang_site_config'] = \
        os.path.join(clang_obj_root, 'test', 'lit.site.cfg')
    clang_tools_extra_obj_root = os.path.join(clang_obj_root, 'tools', 'extra')
    if os.path.exists(clang_tools_extra_obj_root):
        builtin_parameters['clang_tools_extra_site_config'] = \
            os.path.join(clang_tools_extra_obj_root, 'test', 'lit.site.cfg')

if __name__=='__main__':
    import lit
    lit.main(builtin_parameters)