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

Andrzej Warzynski via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 27 10:07:32 PDT 2023


awarzynski added a comment.

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

> @MaskRay and @awarzynski: Thanks for your comments.  You both have pointed out that the `-vv`-style command trace breaks apart commands joined by `|` (and other command separators) so it's hard to copy-and-paste command lines to a terminal.
>
> Which of the following would you prefer?
>
> 1. Keep "Script:".  To address the redundancy problem that motivated this patch, disable "Script:" by default when just given -a or -v, and add some new command-line option to enable it (or maybe recycle -vv).  To address the PYTHON line problem that motivated this patch, "Script:" would not include RUN lines beyond the first PYTHON line.
>
> 2. Extend lit's internal shell to print full shell command lines before executing them.  Reconfigure tests suites that need this functionality to use lit's internal shell.  (The examples you showed appear to be using external shells.)  Perhaps improve the formatting of stdout/stderr to better distinguish it so shell commands are easier to find.

We should probably aim for Option 2 as the cleaner and more future-proof approach. Personally, I mostly care about being able to copy & paste the command. "Script" (in the output) is nice as it makes finding `RUN` lines easy, but it's definitely not a show-stopper.

I don't quite follow the "internal vs external shell" argument - could you explain? Why can't we make this work with both internal _and_ external shell?


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