[PATCH] D30380: Teach lit to expand glob expressions

Mehdi AMINI via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 28 13:59:22 PST 2017


mehdi_amini added a comment.

In https://reviews.llvm.org/D30380#688967, @zturner wrote:

> In https://reviews.llvm.org/D30380#688952, @mehdi_amini wrote:
>
> > In https://reviews.llvm.org/D30380#688941, @MatzeB wrote:
> >
> > > In https://reviews.llvm.org/D30380#688937, @zturner wrote:
> > >
> > > > In https://reviews.llvm.org/D30380#688936, @zturner wrote:
> > > >
> > > > > I don't think it's necessarily fair to classify these tests as poorly designed.  dynamic tools, by design, often need to do things with the file system and the tests need to verify this behavior.
> > > >
> > >
> >
> >
> > That's a reason to look at the filesystem, that's not a reason that explain why a test does not know in advance which file will be generated or need to be looked at. Can you clarify this?
>
>
> One example is when the input to a tool is an executable file name, where on Windows you have to suffix it with `.exe`.  You can see this in my earlier comment `dump_coverage.test(3)`.  It writes `llvm-FuzzerDerefTest*` which catches the filename either with or without a `.exe` suffix.


This is statically defined, so it could be solved with a lit expansion %exe_suffix

> Other examples include where a test program can take many inputs, and you put all your input files in a single directory.  Sure you could write out each one, but this is higher maintenance and much uglier to look at when reading the test.  Every time you add or remove an input, you need to go remember to update the test.

Can you point at one such test? I'd be interested to see what kind of test does not need to be changed/updated anyway when adding an input.


https://reviews.llvm.org/D30380





More information about the llvm-commits mailing list