forked from OSchip/llvm-project
38 lines
1.1 KiB
Python
38 lines
1.1 KiB
Python
# -*- Python -*-
|
|
|
|
# Configuration file for the 'lit' test runner.
|
|
|
|
import os
|
|
import shlex
|
|
|
|
import lit.formats
|
|
|
|
# name: The name of this test suite.
|
|
config.name = 'lldb-Suite'
|
|
|
|
# suffixes: A list of file extensions to treat as test files.
|
|
config.suffixes = ['.py']
|
|
|
|
# test_source_root: The root path where tests are located.
|
|
# test_exec_root: The root path where tests should be run.
|
|
config.test_source_root = os.path.join(config.lldb_src_root, 'packages',
|
|
'Python', 'lldbsuite', 'test')
|
|
config.test_exec_root = config.test_source_root
|
|
|
|
# Build dotest command.
|
|
dotest_cmd = [config.dotest_path, '-q']
|
|
dotest_cmd.extend(config.dotest_args_str.split(';'))
|
|
|
|
# We don't want to force users passing arguments to lit to use `;` as a
|
|
# separator. We use Python's simple lexical analyzer to turn the args into a
|
|
# list.
|
|
if config.dotest_lit_args_str:
|
|
dotest_cmd.extend(shlex.split(config.dotest_lit_args_str))
|
|
|
|
# Load LLDB test format.
|
|
sys.path.append(os.path.join(config.lldb_src_root, "lit", "Suite"))
|
|
import lldbtest
|
|
|
|
# testFormat: The test format to use to interpret tests.
|
|
config.test_format = lldbtest.LLDBTest(dotest_cmd)
|