forked from OSchip/llvm-project
37 lines
1.3 KiB
Python
37 lines
1.3 KiB
Python
# -*- Python -*-
|
|
|
|
# Configuration file for the 'lit' test runner.
|
|
|
|
import os
|
|
|
|
import lit.formats
|
|
|
|
# Check that the object root is known.
|
|
if config.test_exec_root is None:
|
|
# Otherwise, we haven't loaded the site specific configuration (the user is
|
|
# probably trying to run on a test file directly, and either the site
|
|
# configuration hasn't been created by the build system, or we are in an
|
|
# out-of-tree build situation).
|
|
|
|
# Check for 'llvm_unit_site_config' user parameter, and use that if available.
|
|
site_cfg = lit_config.params.get('lldb_unit_site_config', None)
|
|
if site_cfg and os.path.exists(site_cfg):
|
|
lit_config.load_config(config, site_cfg)
|
|
raise SystemExit
|
|
|
|
# name: The name of this test suite.
|
|
config.name = 'lldb-Unit'
|
|
|
|
# suffixes: A list of file extensions to treat as test files.
|
|
config.suffixes = []
|
|
|
|
# test_source_root: The root path where unit test binaries are located.
|
|
# test_exec_root: The root path where tests should be run.
|
|
config.test_source_root = os.path.join(config.lldb_obj_root, 'unittests')
|
|
config.test_exec_root = config.test_source_root
|
|
|
|
# testFormat: The test format to use to interpret tests.
|
|
if not hasattr(config, 'llvm_build_mode'):
|
|
lit_config.fatal("unable to find llvm_build_mode value on config")
|
|
config.test_format = lit.formats.GoogleTest(config.llvm_build_mode, 'Tests')
|