]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - lit/Unit/lit.cfg
Vendor import of lldb trunk r290819:
[FreeBSD/FreeBSD.git] / lit / Unit / lit.cfg
1 # -*- Python -*-
2
3 # Configuration file for the 'lit' test runner.
4
5 import os
6
7 import lit.formats
8
9 # Check that the object root is known.
10 if config.test_exec_root is None:
11     # Otherwise, we haven't loaded the site specific configuration (the user is
12     # probably trying to run on a test file directly, and either the site
13     # configuration hasn't been created by the build system, or we are in an
14     # out-of-tree build situation).
15
16     # Check for 'llvm_unit_site_config' user parameter, and use that if available.
17     site_cfg = lit_config.params.get('lldb_unit_site_config', None)
18     if site_cfg and os.path.exists(site_cfg):
19         lit_config.load_config(config, site_cfg)
20         raise SystemExit
21
22 # name: The name of this test suite.
23 config.name = 'lldb-Unit'
24
25 # suffixes: A list of file extensions to treat as test files.
26 config.suffixes =  []
27
28 # test_source_root: The root path where unit test binaries are located.
29 # test_exec_root: The root path where tests should be run.
30 config.test_source_root = os.path.join(config.lldb_obj_root, 'unittests')
31 config.test_exec_root = config.test_source_root
32
33 # testFormat: The test format to use to interpret tests.
34 if not hasattr(config, 'llvm_build_mode'):
35     lit_config.fatal("unable to find llvm_build_mode value on config")
36 config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, 'Tests')