[PATCH] D154984: [lit] Drop "Script:", make -v and -a imply -vv

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 12 11:49:12 PDT 2023


jdenny added a comment.

In D154984#4493934 <https://reviews.llvm.org/D154984#4493934>, @jdenny wrote:

> 2. They take a long time to run.  I don't know how to address that in the -vv trace.  Indeed it seems you would need something like the "Script:" section.

It just occurred to me that lit doesn't show the "Script:" section until the execution has terminated (lit prints it at the same time as the script's exit code).  So this execution time issue is more of a feature request.  It is not a regression that would be caused by this patch.

In D154984#4494259 <https://reviews.llvm.org/D154984#4494259>, @ldionne wrote:

> This is non-blocking, but I do use `Script:` a lot to reproduce libc++ test failures. Here's an example:

Thanks for describing your use case.

> There are two properties of `Script` that I like here:
>
> 1. It is not quoted. It is easier to copy-paste, modify and run into a terminal to reproduce the issue and iterate outside of Lit.

Are you saying you have to do some sort of fixup in order to copy-paste and run it in a terminal?  Or are you saying the quoting is just annoying if you want to modify the command line?  Either way, for lit's internal shell (which your example appears to be using), I'm sure we can find a way to reduce unnecessary quoting.

> 2. It shows all commands at once instead of showing only the ones that were executed, with output in between. If I want to know how to execute the program that was compiled above, I can easily use `Script` to figure that out. If I only have the `Command Output`, I have to search for `EXECUTED AS` through potentially a lot of output from the first command.

Would it be difficult in your workflow to send it through grep?  Is there any way to format the -vv trace to make that easier?

> And if the first command fails, then I will never know how this would get executed if this were to compile successfully.

I don't think we can address this issue generally with PYTHON directives, but it's still possible to print all leading RUN directives.

> I wouldn't say either of these issues should block this patch, however as-is this will cause a small quality-of-life regression for libc++ development.

Well, my main motivation was to improve quality of life.  For me, "Script:" has been noise for years, but obviously that's not true for everyone.

Would you be ok with @awarzynski's request that "Script:" is printed only with `-print-script`, which doesn't execute the test?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D154984/new/

https://reviews.llvm.org/D154984



More information about the llvm-commits mailing list