[PATCH] D65697: [lit] Fix internal env calling internal commands

Joel E. Denny via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 20 17:00:37 PDT 2019


jdenny marked an inline comment as done.
jdenny added a comment.

In D65697#1638518 <https://reviews.llvm.org/D65697#1638518>, @rnk wrote:

> lgtm
>
> Now this one is super simple. :)


Yep, thanks!



================
Comment at: llvm/utils/lit/lit/TestRunner.py:852-853
+            #   env FOO=1 %{another_env_plus_cmd} | FileCheck %s
+            if cmd_shenv is shenv:
+                cmd_shenv = ShellEnvironment(shenv.cwd, shenv.env)
+            args = updateEnv(cmd_shenv, args)
----------------
rnk wrote:
> I guess this is a nit, but I'd pull the copy out of the loop and guard it with a single `if args[0] == 'env':` check. That way it's clearer that it only happens once.
I'll get back to you on that.  I'll soon post a patch that handles issues for `not` here, and then the first `env` might not be `args[0]`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D65697/new/

https://reviews.llvm.org/D65697





More information about the llvm-commits mailing list