diff options
| -rw-r--r-- | lldb/lit/Suite/lit.cfg | 10 | ||||
| -rw-r--r-- | lldb/lit/Suite/lit.site.cfg.in | 5 |
2 files changed, 11 insertions, 4 deletions
diff --git a/lldb/lit/Suite/lit.cfg b/lldb/lit/Suite/lit.cfg index 2873479282c..eb0fac9541a 100644 --- a/lldb/lit/Suite/lit.cfg +++ b/lldb/lit/Suite/lit.cfg @@ -3,6 +3,7 @@ # Configuration file for the 'lit' test runner. import os +import shlex import lit.formats @@ -14,13 +15,20 @@ 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_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 diff --git a/lldb/lit/Suite/lit.site.cfg.in b/lldb/lit/Suite/lit.site.cfg.in index ab79b2b25d6..40f3310c612 100644 --- a/lldb/lit/Suite/lit.site.cfg.in +++ b/lldb/lit/Suite/lit.site.cfg.in @@ -14,14 +14,13 @@ config.python_executable = "@PYTHON_EXECUTABLE@" config.dotest_path = "@LLDB_SOURCE_DIR@/test/dotest.py" config.dotest_args_str = "@LLDB_DOTEST_ARGS@" config.lldb_disable_python = @LLDB_DISABLE_PYTHON@ - +config.dotest_lit_args_str = None # Additional dotest arguments can be passed to lit by providing a # semicolon-separates list: --param dotest-args="arg;arg". dotest_lit_args_str = lit_config.params.get('dotest-args', None) if dotest_lit_args_str: - config.dotest_args_str += ';' - config.dotest_args_str += dotest_lit_args_str + config.dotest_lit_args_str = dotest_lit_args_str # Support substitution of the tools and libs dirs with user parameters. This is # used when we can't determine the tool dir at configuration time. |

