[PATCH] [LIT] Add SuffixDispatchTest for use in libc++ and libc++abi tests.

Eric Fiselier eric at efcs.ca
Tue Dec 9 19:13:45 PST 2014


>>! In D6206#32, @ddunbar wrote:
> I see.
> 
> Generally speaking, I think it is great to improve the implementation of
> this test format, but I don't think that it meets the bar to be included in
> lit proper. I want to keep lit pretty general purpose, and this test format
> is just so specific to the libc.* use case that its hard to imagine many
> other clients.
>
> Part of my hesitation comes from feeling that this isn't such a great test
> format to start with. As a format, it isn't all that flexible (mangling
> part of the metadata into the filename really doesn't leave much room for
> extension, and then if we start putting metadata in the file too we have it
> in two places).





> Is there another way you can manage sharing the test format implementation
> with those repositories?
> 
> Alternately, it seems like the main thing going for this test format is it
> makes sense when you have a large number of tests which all run the same
> action. We actually end up having that problem in other places too (there
> are subsets of clang tests which all follow the same pattern), so I wonder
> if there might some value in exploring an extension of the ShTest format
> that solved this problem explicitly, and then migrating the libc.* tests to
> that.
> 
> For example, just to brainstorm, if the ShTest format had a way to use a
> "prelude" script for all files in a directory, could that be the basis for
> using the ShTest format for libc++?
> 
>  - Daniel

After seeing more of LIT, I agree this is not a good test format. Most of the handling of internal metadata already exists within `TestRunner.parseIntegratedTestScript`. I'll lift that to where it belongs. I'll also remove `Compiler` and `CompileAndExecuteTestRunner`. Those probably shouldn't live inside lit.

After removing all of that there is no more code that really needs to be shared between libc++ and libc++abi. I'll put the `executeCommandPty` changes in a different patch and submit them separately. 

Thanks for the input.

http://reviews.llvm.org/D6206






More information about the llvm-commits mailing list