llvm-project/lldb/lit
Dave Lee 0affb5822f Quiet command regex instructions during batch execution
Summary:
Within .lldbinit, regex commands can be structured as a list of substitutions over
multiple lines. It's possible that this is uninentional, but it works and has
benefits.

For example:

    command regex <command-name>
    s/pat1/repl1/
    s/pat2/repl2/
    ...

I use this form of `command regex` in my `~/.lldbinit`, because it makes it
clearer to write and read compared to a single line definition, because
multiline substitutions don't need to be quoted, and are broken up one per line.

However, multiline definitions result in usage instructions being printed for
each use. The result is that every time I run `lldb`, I get a dozen or more
lines of noise. With this change, the instructions are only printed when
`command regex` is invoked interactively, or from a terminal, neither of which
are true when lldb is sourcing `~/.lldbinit`.

Reviewers: clayborg, jingham

Reviewed By: clayborg

Subscribers: jdoerfert, kastiglione, xiaobai, keith, lldb-commits

Differential Revision: https://reviews.llvm.org/D48752

llvm-svn: 355793
2019-03-10 23:15:48 +00:00
..
Breakpoint build.py: Implement "gcc" builder 2018-12-12 08:54:14 +00:00
BuildScript [lldb] [lit] Attempt to fix regex in toolchain-clang.test 2019-03-06 14:49:48 +00:00
Commands Quiet command regex instructions during batch execution 2019-03-10 23:15:48 +00:00
Driver [testsuite] Add a comment explaining what this test does. 2019-02-12 23:02:53 +00:00
ExecControl/StopHook [lit, windows] Disable stop-hook-threads on Windows 2019-03-05 21:43:04 +00:00
Expr [lit] Make sure tests are actually skipped on darwin and windows. 2019-01-17 21:57:33 +00:00
Heap Fix lldb's macosx/heap.py cstr command. 2018-12-17 18:21:51 +00:00
Minidump Fix short options syntax in Minidump test 2019-02-26 15:38:30 +00:00
Modules [lldb] [ObjectFile/ELF] Fix recognizing NetBSD images 2019-02-20 14:31:06 +00:00
Python Avoid using -S in combination with "script"; it's unreliable. 2019-03-07 00:46:56 +00:00
Quit [lldb] Update shebang python2 -> python 2019-01-26 01:05:02 +00:00
Reproducer [Reproducers] TestImagineList.test -> TestImageList.test 2019-03-08 00:53:57 +00:00
Settings Refactor the lit configuration files 2018-11-02 17:49:01 +00:00
Suite [lldb] [test] Pass appropriate -L&-Wl,-rpath for libc++ on NetBSD 2019-03-06 14:03:18 +00:00
SymbolFile [lldb] [test] Adjust XFAIL list to match buildbot results 2019-03-09 12:47:38 +00:00
Unit [CMake] In standalone builds, LLVM_BINARY_DIR should point to LLVM's binary directory 2019-01-09 16:25:37 +00:00
helper Sanity check --max-gdbserver-port 2019-03-06 21:52:19 +00:00
tools [lldb-instr] Support LLDB_RECORD_DUMMY 2019-03-08 18:33:40 +00:00
CMakeLists.txt [CMake] Quick-Fix targets don't exist when building against LLVM install-tree with LLDB_INCLUDE_TESTS=ON 2019-01-28 16:15:27 +00:00
lit-lldb-init Add EchoCommentCommands to CommandInterpreterRunOptions in addition to the existing EchoCommands and expose both as interpreter settings. 2018-10-05 16:49:47 +00:00
lit.cfg.py Fix clang test suite on Windows by reverting part of r347216 2018-11-19 19:36:28 +00:00
lit.site.cfg.py.in [lldb] [test] Skip lldb-mi test if LLDB_DISABLE_PYTHON is used 2019-02-11 14:09:43 +00:00