[Lldb-commits] [PATCH] D54680: Don't use lldb -O in lit tests
Zachary Turner via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Sun Nov 18 17:26:33 PST 2018
zturner added a comment.
In https://reviews.llvm.org/D54680#1302408, @davide wrote:
> Is there a way of fixing this that doesn't require scattering the test between two files?
Unless we create a utility that extracts lines based on prefixes and outputs them to a temporary file, I don't have any great ideas.
FWIW I actually find it easier to read this way, the interaction between the various command line options makes it pretty confusing to follow the order in which the various commands are executed. combining -O, -o, -S, and -s makes it quite hard to figure out what commands are actually being executed and in what order.
Another advantage to having the commands be in their own file is that it's easy to reproduce the failure by just running `lldb -s script.lldbinit`.
I'd even go so far as to say that maybe the .test file should be the source code + check lines, and each of the 3 test cases should be a separate script file with all the commands together in one file. It could use the `command source` command to avoid duplication. So, for example, `stop-hook-1.lldbinit` could be something like:
target stop-hook add -f stop-hook.c -l 30 -e 34 -o "expr ptr"
command source stop-hook-common.lldbinit
More information about the lldb-commits