[llvm-dev] can llvm-lit pass output of one RUN command as an argument to another RUN command

don hinton via llvm-dev llvm-dev at lists.llvm.org
Wed Aug 2 20:16:06 PDT 2017


Thanks.  I grep'd all the tests and found a few cases using xargs, i.e.,
"cat %t | xargs".  They don't set windows as unsupported, so I'm going to
try that.

thanks again...
don

On Wed, Aug 2, 2017 at 4:28 PM, Matthias Braun <mbraun at apple.com> wrote:

> lit run lines are written in posix shell. However as you suspect the
> situation on windows is special, lit comes with its own shell
> parser/interpreter which doesn't support the full range of posix shell
> features. Glancing at the code in llvm/utils/lit/lit/ShUtils.sh I don't see
> anything supporting command substitution.
>
> - Matthias
>
> On Aug 2, 2017, at 4:22 PM, don hinton via llvm-dev <
> llvm-dev at lists.llvm.org> wrote:
>
> Btw, this works on *nix type systems, but I'm not sure about Windows.
>
>
> On Wed, Aug 2, 2017 at 4:06 PM, don hinton <hintonda at gmail.com> wrote:
>
>> Is there a way to do this with llvm-lit, i.e., use the equivalent of
>> backticks?
>>
>> foo takes a single argument, but doesn't read from stdin.
>>
>> // RUN foo some_arg > %t; FileCheck %s < %t
>> // RUN foo `cat %t` | FileCheck --check-prefix=INVERSE
>>
>> // CHECK: {{^[0-9]+$}}
>> // INVERSE: some_arg
>>
>> thanks...
>> don
>>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170802/b5ec60df/attachment.html>


More information about the llvm-dev mailing list