[clang-tools-extra] r175544 - Add support for auto-generating LIT tests by the build

Chandler Carruth chandlerc at google.com
Thu Mar 7 02:14:24 PST 2013


On Wed, Mar 6, 2013 at 2:17 PM, Chandler Carruth <chandlerc at google.com>wrote:

> On Tue, Feb 19, 2013 at 11:08 AM, Edwin Vane <edwin.vane at intel.com> wrote:
>
>> Author: revane
>> Date: Tue Feb 19 13:08:10 2013
>> New Revision: 175544
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=175544&view=rev
>> Log:
>> Add support for auto-generating LIT tests by the build
>>
>> autoconf and CMake flavours both updated to auto-generate files for use
>> in cpp11-migrate's LIT tests.
>>
>
> Sorry I just saw this and didn't comment earlier, but I'm not a huge fan
> of this.
>
> First, I think we should be *extremely* judicious in the use of *auto*
> generated tests. They are often much harder to debug because the test isn't
> checked in somewhere that folks can see and poke at. Using a script to help
> generate or update tests with a high degree of repetition, but still
> keeping the test text checked in directly, is often easier on developers.
> Clearly, this is subjective. We have to evaluate on a case-by-case basis.
> But I'd encourage some caution about generating too many tests.
>
> Second (and more immediately), we don't need this in the build system.
> Tests already have RUN lines, you should just add whatever generator you
> need to the tools lit knows about, and generate the inputs in your RUN
> lines. This also makes it easier to evaluate for each test whether
> generating the input on the fly is really the best option.
>
> I'm going to try to convert everything to follow the second point.
>

I've pulled out the build system changes and reworked the tests in r176627
to not require generated code at all. Sorry for doing this so abruptly, but
the changes to the build system were blocking our integration of
clang-tools-extra with our own build systems, and given the concerns about
complexity it seemed the right path forward was to just make the jump. It
turned out to simplify the whole thing quite a bit IMO. the tests
themselves are a bit verbose now, but that can be fixed by teaching the
clang tools to accept a source file on stdin and write the transformed file
onto stdout. That would be really nice for the entire clang tools test
suite. We could even bake in support for stripping comments.

Let me know if you have problems or questions here, I feel bad for just
charging forward, but this kept breaking stuff for us.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20130307/9c4650af/attachment.html>


More information about the cfe-commits mailing list