[PATCH] D30380: Teach lit to expand glob expressions

Zachary Turner via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 3 12:07:01 PST 2017


Yea I'm fairly sure that happens before any of my code runs. It doesn't
even lex the run lines in that case, it just concatenates them and shells
out.

By the time we get to my code, it's already decided to use lit for
everything including spawning the processes
On Fri, Mar 3, 2017 at 11:58 AM Matthias Braun <matze at braunis.de> wrote:

> On Mar 3, 2017, at 11:31 AM, Zachary Turner <zturner at google.com> wrote:
>
> MatzeB: I have not tested, but my understanding was that on Unix systems
> we aren't even using the lit shell, so none of this code would ever get run
> anyway.
>
>
> Ok if the bots don't complain this should be fine. I was worried about
> this:
>
> RUN: produce_files --into_dir %T
> RUN: consume_files %T/*
> ?
>
> Which we eventually concatenate and pass as a single command to the shell:
> "{produce_files --into_dir /tmp/some/dir} && { consume_files
> /tmp/some/dir/*}". I was worried that the globbers are resovled before the
> produce_files command had even run. Admittedly I'm not an expert on those
> shell details, and it seems the {} solved it here if the bots report no
> problem...
>
> - Matthias
>
>
> On Fri, Mar 3, 2017 at 11:16 AM Matthias Braun via Phabricator <
> reviews at reviews.llvm.org> wrote:
>
> MatzeB added a comment.
>
> Have you tested these changes on a unix system yet? I think we concatenate
> all the RUN lines together into a single command on unix, so wouldn't that
> resolve the glob pattern before any of the commands that produce the
> intermediate files have even run?
>
> > I would really like the lit shell to be as much like bash as possible to
> match test writers' expectations.
>
> +1 (though we should better say posix shell instead of bash)! In any way
> shell should be a very familiar language and should really be powerful
> enough for our needs.
>
>
> Repository:
>   rL LLVM
>
> https://reviews.llvm.org/D30380
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170303/8e8cff0c/attachment.html>


More information about the llvm-commits mailing list