[Lldb-commits] [lldb] r333432 - [lit] Add support for passing arguments to dotest.py via lit.

Jonas Devlieghere via lldb-commits lldb-commits at lists.llvm.org
Tue May 29 09:49:07 PDT 2018

Author: jdevlieghere
Date: Tue May 29 09:49:07 2018
New Revision: 333432

URL: http://llvm.org/viewvc/llvm-project?rev=333432&view=rev
[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"


Modified: lldb/trunk/lit/Suite/lit.site.cfg.in
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/lit/Suite/lit.site.cfg.in?rev=333432&r1=333431&r2=333432&view=diff
--- lldb/trunk/lit/Suite/lit.site.cfg.in (original)
+++ lldb/trunk/lit/Suite/lit.site.cfg.in Tue May 29 09:49:07 2018
@@ -14,6 +14,14 @@ config.python_executable = "@PYTHON_EXEC
 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.

More information about the lldb-commits mailing list