don hinton via llvm-dev
2017-Aug-02 23:06 UTC
[llvm-dev] can llvm-lit pass output of one RUN command as an argument to another RUN command
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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170802/7f5f8ee2/attachment.html>
don hinton via llvm-dev
2017-Aug-02 23:22 UTC
[llvm-dev] can llvm-lit pass output of one RUN command as an argument to another RUN command
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 >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170802/75c661ec/attachment.html>
Matthias Braun via llvm-dev
2017-Aug-02 23:28 UTC
[llvm-dev] can llvm-lit pass output of one RUN command as an argument to another RUN command
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 <mailto: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/43c57936/attachment.html>