lean-mlir icon indicating copy to clipboard operation
lean-mlir copied to clipboard

tests: have a story for end-to-end tests that actually run the `opt` binary

Open alexkeizer opened this issue 2 months ago • 1 comments

We've run into a bug where the opt binary segfaults. To catch such errors in the future, it's clearly not enough to just run #guard_msgs in #eval ...-based tests, but we actually need to run the opt binary in CI.

Still, I'd like to avoid a workflow that relies on hand-crafting bash scripts that check the output, so let's investigate if there's a low-overhead existing solution we can adopt. I believe the LLVM community uses filecheck, maybe we can adopt that?

alexkeizer avatar Oct 02 '25 09:10 alexkeizer

While the actual FileCheck is in C++, there is a nice python clone of FileCheck that passes > 98% of the LLVM test suite by @AntonLydike : https://github.com/AntonLydike/filecheck, that we can depend on

bollu avatar Oct 02 '25 09:10 bollu