[libcxx-commits] [libcxx] [libcxx][test] Add support for LLVM-style split tests (PR #188283)

Michael Buch via libcxx-commits libcxx-commits at lists.llvm.org
Thu Mar 26 07:15:54 PDT 2026


Michael137 wrote:

> I haven't thought about this deeply yet, but would it be possible to instead add a builtin command to Lit to achieve the same thing? That would have the benefit of being the same thing that split-file does in the rest of LLVM, and not having to introduce a new test file "type" -- we could just use split-files from within a shtest.

Hmm but that would require either shell-ing out to the `split-file` utility (in which case we still have the dependency on LLVM) or rewriting `split-file` in Python and put it into LIT. I suspect there's going to be some pushback to re-implementing/adding another `split-file` into LIT (if the C++ utility already exists). Having this new test-type doesn't restrict us from moving it out of libc++ and into LIT. But I do understand that it's extra maintenance cost and probably (?) only useful for the upcoming LLDB testing.

That being said, `split-file` is < 200 lines of C++ code and mostly boilerplate for commandline argument handling. So maybe rewriting it in Python is not going to face much resistance. I'm not super aware with pip packages. Is rewriting this in Python a pre-requisite to @boomanaiden154's suggestion? I assumed so, similar to `FileCheck`.

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


More information about the libcxx-commits mailing list