[llvm] [lit] Add LIT_CURRENT_TESTCASE environment variable when running tests (PR #168762)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Wed Nov 19 23:54:08 PST 2025


jh7370 wrote:

> @boomanaiden154 I added a testcase.
> 
> Apparently `env` (with no args) does not correctly chain with `| FileCheck %s`, so every testcase in `env-no-subcommand.txt` is broken (passes no matter the output). I don't know how to fix that easily, so I'm just going out to bash here for this test.

No idea if this would work, but could you do `env > %t.txt` followed by `FileCheck %s --input-file %t.txt` on the next line or something like that?

https://github.com/llvm/llvm-project/pull/168762


More information about the llvm-commits mailing list