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

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 26 15:53:09 PDT 2023


MaskRay added a comment.

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

> In D154984#4508883 <https://reviews.llvm.org/D154984#4508883>, @MaskRay wrote:
>
>>> 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.
>>
>> Does this mean to print a pipe as one single command instead of two?
>
> Yes, it would print command lines the way "Script:" did except it would print them right before executing them.
>
>> I don't know how people feel about printing `# command output:` immediately after printing a command with the internal shell (`LIT_USE_INTERNAL_SHELL=1`).
>> It seems to get in the way if we want to replace `Script:`.
>
> I'm not sure I understand your meaning.  How does it get in the way?

It gets in the way because if people want to copy all commands, they'd copy the command output as well.
And to differentiate command output from RUN lines , we have to print prompts like `$ `.

If the internal shell can collect `Command Output (stdout):` and stderr and print them after all RUN commands are dumped, we can remove the prompts.

>> Regarding the external shell, it collects all stdout and stderr. I think just removing the `+ ` sign at the beginning of a command will make the output a replacement for `Script:`.
>
> Do you know how to tell the external shells to change the way they format their trace output?  Is there a reason test suites still need to use external shells instead of lit's more portable internal shell?

I think many more developers work on non-Windows platforms and get external shell by default, and very few people know `LIT_USE_INTERNAL_SHELL=1`.

  Command Output (stdout)
  $ ...

If we can make the internal shell work well enough and make it the default for non-Windows platforms, that's fine with me.

For now, I mostly care about the behavior of the external behavior:)


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