[llvm-commits] [PATCH] tests for FileCheck

Eli Bendersky eliben at google.com
Thu Nov 15 06:10:05 PST 2012


Hi all,

FileCheck is an important part of our testing infrastructure; although
it's long become a non-trivial utility, and keeps getting new features
added and bugs fixed on a regular basis it has no tests of its own.
True, many of the actual LLVM tests also exercise FileCheck to some
extent, but IMHO having specific tests targeted to the tool itself is
important.

The attached patch proposes an initial step into this direction. It
does the obvious by reusing our lit infrastructure to test FileCheck
itself. A mix of normal and "no match" (using the "not" tool) tests is
used to make sure FileCheck isn't just stupidly returning 0. Only a
couple of trivial tests are added at this point, but the idea is to
serve as a sample and a starting point, not a comprehensive test
suite. If the idea is acceptable to people, I will be happy to add
more tests. In the future, hopefully, people fixing FileCheck bugs and
adding features will have a place to add tests to.

An alternative I was considering is adding unit tests, but this is
probably more tricky as it would require splitting FileCheck into a
library and a tool using that library. I'm not sure it's worth the
effort, but a discussion in this direction can also be interesting.

Eli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: filecheck_tests.1.patch
Type: application/octet-stream
Size: 1391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20121115/42859048/attachment.obj>


More information about the llvm-commits mailing list