[llvm] [lit] Add an option to read an xfail list from a file (PR #163959)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 22 08:56:58 PDT 2025


dcandler wrote:

> Can you just use the environment variable?

That's been my current workaround, but the platform limits on Windows were what made me look at other solutions.

> > Python argparse supports this https://docs.python.org/3/library/argparse.html#fromfile-prefix-chars
> >
> > Could that work for you?
> 
> The basic format is:
> 
> ```
> --option
> value
> ```
> 
> You should experiment to see how it handles newlines or not. It could be that your 100 xfails still need to be all on one line.

After some refactoring of our downstream code, this does indeed work. The entire test list does need to all be on one line so it isn't particularly readable, but since it's a generated file only read by CMake I don't think that will be an issue.

I agree it would be better to avoid overcomplicating with additional options, so I'll close this for now. Thanks for taking a look.

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


More information about the llvm-commits mailing list