Platform-specific RUN lines in lit tests?

Robinson, Paul Paul_Robinson at playstation.sony.com
Wed May 14 12:13:56 PDT 2014


> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-bounces at cs.uiuc.edu] On Behalf Of Alexey Samsonov
>
> > I'm currently enabling ASan lit tests on Windows.
> >
> > One problem I have is that some tests use multiple RUN lines, some of which
> > are cross-platform and others are platform- or compiler-specific.
> > Is there any magic method to make some of the RUN lines conditional for a
> > specific OS?
>
> In fact, I'd vote for adding this feature to lit :) Having 
>  RUN-Windows:
> would be nice. We can parse
>  RUN-<foo>:
> lines and use them in the test script only if <foo> is in the list of 
> available features.
> Otherwise we'll have to copy the tests around or do what David suggests, 
> which is fine,
> but makes the tests less readable and less self-contained.
 
Currently the host platform mostly isn't in the available-features list.
There are special hacks in Clang's lit.cfg for "system-darwin" and
very recently "system-windows" but nothing else.
A more generalized approach would be worthwhile if anybody needed a third.

--paulr





More information about the llvm-commits mailing list