[PATCH] D150856: [lit] Add %{for-each-file} substitution

Aaron Ballman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 16 09:44:08 PDT 2023


aaron.ballman added a comment.

In D150856#4428669 <https://reviews.llvm.org/D150856#4428669>, @jdenny wrote:

> In D150856#4428651 <https://reviews.llvm.org/D150856#4428651>, @aaron.ballman wrote:
>
>> In D150856#4428635 <https://reviews.llvm.org/D150856#4428635>, @jdenny wrote:
>>
>>> In D150856#4428523 <https://reviews.llvm.org/D150856#4428523>, @Endill wrote:
>>>
>>>> We're also can't chain compiler invocations via `&&`: `RUN: %{run98} && %{run11} && %{run14} && %{run17} && %{run20} && %{run23}`, because having dedicated stdout log per each language mode makes DR test debugging workflow much better.
>>>
>>> Can you explain that a bit more or point to a reference?  I find lit -vv makes it pretty easy to understand what commands are executed and what output goes with each.
>>
>> Using `&&` means that an earlier process failure (nonzero return) causes later commands to not be run at all, right?
>
> Yes.  Lit does that anyway when commands appear on separate RUN lines.

Ah, I didn't know lit was already doing that, thanks!

My primary concern is how easy it will be for someone to extend these tests. The current proposed approach is quite easy: take a RUN line, copy and paste it, add your new option and it all just works. With using `DEFINE` and `REDEFINE`, you're forced to think about how lit works a *lot* more and it looks like you have to write a lot more RUN lines overall, at least as best I can tell. @jdenny, it might be helpful if you were to take the existing dr5xx.cpp file and show us what you believe it would end up looking like with your approach. I can understand what it will look like with the approach @Endill is suggesting, but I'm not certain I've seen a correct demonstration of how your approach works (and I don't want to judge it unfairly).


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D150856



More information about the llvm-commits mailing list