[all-commits] [llvm/llvm-project] a3172d: [lldb] Quietly source lit-lldb-init
Dave Lee via All-commits
all-commits at lists.llvm.org
Mon Aug 29 10:22:25 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a3172df59c32aac48c113eb7d6a1324aaa95c474
https://github.com/llvm/llvm-project/commit/a3172df59c32aac48c113eb7d6a1324aaa95c474
Author: Dave Lee <davelee.com at gmail.com>
Date: 2022-08-29 (Mon, 29 Aug 2022)
Changed paths:
M lldb/test/Shell/CMakeLists.txt
M lldb/test/Shell/helper/toolchain.py
Log Message:
-----------
[lldb] Quietly source lit-lldb-init
Improve utility of `FileCheck` output when a shell test fails.
The conflict is from:
1. On failure, `FileCheck` prints 5 lines of context
2. Shell tests first source `lit-lldb-init`, having the effect of printing its contents
If a `FileCheck` failure happens at the beginning of the input, then the
context shown is the `lit-lldb-init`, as it's over 5 lines and is the first
thing printed. As the init contents are fairly static, and presumably
uninteresting to most test failures, it seems reasonable to not print it.
Unfortunately it's not possible to use the `--source-quietly` flag in the lldb
invocation, because it will quiet all other `--source` flags on the command
line, making many tests fail.
This fix is a level of indirection, where a new sibling file named
`lit-lldb-init-quiet` is created, and its static contents are:
```
command source -C --silent-run true lit-lldb-init
```
This achieves the result of loading `lit-lldb-init` quietly. The `-C` flag
loads the path relatively.
Differential Revision: https://reviews.llvm.org/D132694
More information about the All-commits
mailing list