[lit] Add support for passing arguments to dotest.py via lit.

The lldb test suite is highly configurable. While part of this
configuration takes place at configure/build-time, a common scenario
involves running the test suite several times with different
configuration. For example, we might want to test the current lldb
against inferiors built with different compilers.

This configuration was already possible for lldb-dotest, but was lacking
for the lit counterpart. It is now possible to pass arguments to pass
  arguments like this:

  ./bin/llvm-lit ../llvm/tools/lldb/lit/Suite/ -Ddotest-args="-foo;-bar"

llvm-svn: 333432
This commit is contained in:
Jonas Devlieghere 2018-05-29 16:49:07 +00:00
parent db9dbac501
commit 36ab8956f4
1 changed files with 8 additions and 0 deletions

View File

@ -14,6 +14,14 @@ config.python_executable = "@PYTHON_EXECUTABLE@"
config.dotest_path = "@LLDB_SOURCE_DIR@/test/dotest.py"
config.dotest_args_str = "@LLDB_DOTEST_ARGS@"
# 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
# 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.
try: