3 # Configuration file for the 'lit' test runner.
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).
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)
22 # name: The name of this test suite.
23 config.name = 'lldb-Unit'
25 # suffixes: A list of file extensions to treat as test files.
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
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')