[llvm-dev] [llvm-lit] Is it possible to write a test for Linux only?
Taewook Oh via llvm-dev
llvm-dev at lists.llvm.org
Fri Mar 3 19:55:43 PST 2017
Maybe I was totally confused. When I see /test/lit.cfg (https://github.com/llvm-mirror/clang/blob/master/test/lit.cfg), some available_features are based on config.target_triple (e.g. https://github.com/llvm-mirror/clang/blob/master/test/lit.cfg#L420), so I though REQUIRES is not necessarily about $host.
On 3/3/17, 7:40 PM, "Jonathan Roelofs" <jonathan at codesourcery.com> wrote:
On 3/3/17 8:29 PM, Taewook Oh wrote:
> It is $target dependent. I’m curious what makes you think it is $host dependent.
Because you're asking about REQUIRES, which refers to features of the
$host. If you just want to write a target dependent test, use -target /
-triple.
Jon
>
> Thanks,
> Taewook
>
> On 3/3/17, 5:10 PM, "Jonathan Roelofs" <jonathan at codesourcery.com> wrote:
>
>
>
> On 3/3/17 12:23 PM, Taewook Oh wrote:
> > Thanks Jon. Actually I tried “x86_64-linux”, but it makes the test “Unsupported” from my linux machine, and it was because my test is under clang, not llvm. It seems that clang doesn’t support “x86_64-linux” yet. Thanks again!
>
> Oh, ok. Follow-up question: why is your clang test $host platform
> dependent (instead of $target dependent)?
>
>
> Jon
>
> >
> > Best,
> > Taewook
> >
> > On 3/3/17, 10:57 AM, "Jonathan Roelofs" <jonathan at codesourcery.com> wrote:
> >
> >
> >
> > On 3/3/17 11:46 AM, Taewook Oh via llvm-dev wrote:
> > > Hello,
> > >
> > >
> > >
> > > I wonder if I can write a test that runs only on Linux. I was thinking
> > > of adding “REQUIRES” to the test, but couldn’t find a feature name for
> > > Linux (if one exists). Thanks!
> >
> > $ grep -r REQUIRES ../llvm/test/ | grep linux
> >
> > The feature name you want is: "x86_64-linux"
> >
> >
> > Jon
> >
> >
> > >
> > >
> > >
> > > Best,
> > >
> > > Taewook
> > >
> > >
> > >
> > > _______________________________________________
> > > LLVM Developers mailing list
> > > llvm-dev at lists.llvm.org
> > > https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.llvm.org_cgi-2Dbin_mailman_listinfo_llvm-2Ddev&d=DwIDaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=kOsLCgQzH7N8ptZ7diJD9g&m=bzBdn7WCgwl6-0aL2ULfM0PsytR1IyK9EOCcVbUvlT4&s=Wtp9I5P84Z8qjfl3UMV9sOVOpNNik3wJH5knbhrN75s&e=
> > >
> >
> > --
> > Jon Roelofs
> > jonathan at codesourcery.com
> > CodeSourcery / Mentor Embedded
> >
> >
>
> --
> Jon Roelofs
> jonathan at codesourcery.com
> CodeSourcery / Mentor Embedded
>
>
>
--
Jon Roelofs
jonathan at codesourcery.com
CodeSourcery / Mentor Embedded
More information about the llvm-dev
mailing list