[all-commits] [llvm/llvm-project] cb2c4b: [lit] Fix internal env calling env

Joel E. Denny via All-commits all-commits at lists.llvm.org
Fri Nov 1 11:09:50 PDT 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: cb2c4bb0e0da675bb0ab3a3fce4cbb014d83f675
      https://github.com/llvm/llvm-project/commit/cb2c4bb0e0da675bb0ab3a3fce4cbb014d83f675
  Author: Joel E. Denny <jdenny.ornl at gmail.com>
  Date:   2019-11-01 (Fri, 01 Nov 2019)

  Changed paths:
    M llvm/utils/lit/lit/TestRunner.py
    A llvm/utils/lit/tests/Inputs/shtest-env/env-args-nested-none.txt
    A llvm/utils/lit/tests/Inputs/shtest-env/env-calls-env.txt
    M llvm/utils/lit/tests/shtest-env.py

  Log Message:
  -----------
  [lit] Fix internal env calling env

Without this patch, when using lit's internal shell, if `env` on a lit
RUN line calls `env`, lit accidentally searches for the latter as an
external executable.  What's worse is that works fine when a developer
is testing on a platform where `env` is available and behaves as
expected, but it then breaks on other platforms.

`env` calling `env` can make sense if one such `env` is within a lit
substitution, as in D65156 and D65121.  This patch ensures that lit
executes both as internal commands.

Reviewed By: probinson, mgorny, rnk

Differential Revision: https://reviews.llvm.org/D65697




More information about the All-commits mailing list