[all-commits] [llvm/llvm-project] 0d4e65: [lit] Fix internal env calling other internal comm...
Joel E. Denny via All-commits
all-commits at lists.llvm.org
Thu Oct 31 11:39:51 PDT 2019
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 0d4e6519c5dd81034935d4da9c519c17e41b1202
https://github.com/llvm/llvm-project/commit/0d4e6519c5dd81034935d4da9c519c17e41b1202
Author: Joel E. Denny <jdenny.ornl at gmail.com>
Date: 2019-10-31 (Thu, 31 Oct 2019)
Changed paths:
M llvm/utils/lit/lit/TestRunner.py
A llvm/utils/lit/tests/Inputs/shtest-env/env-calls-cd.txt
A llvm/utils/lit/tests/Inputs/shtest-env/env-calls-colon.txt
A llvm/utils/lit/tests/Inputs/shtest-env/env-calls-echo.txt
A llvm/utils/lit/tests/Inputs/shtest-env/env-calls-export.txt
A llvm/utils/lit/tests/Inputs/shtest-env/env-calls-mkdir.txt
A llvm/utils/lit/tests/Inputs/shtest-env/env-calls-rm.txt
M llvm/utils/lit/tests/shtest-env.py
Log Message:
-----------
[lit] Fix internal env calling other internal commands
Without this patch, when using lit's internal shell, if `env` on a lit
RUN line calls `cd`, `mkdir`, or any of the other in-process shell
builtins that lit implements, lit accidentally searches for the latter
as an external executable.
This patch puts such builtins in a map so that boilerplate for them
need be implemented only once. This patch moves that handling after
processing of `env` so that `env` calling such a builtin can be
detected. Finally, because such calls appear to be useless, this
patch takes the safe approach of diagnosing them rather than
supporting them.
Reviewed By: probinson, mgorny, rnk
Differential Revision: https://reviews.llvm.org/D66506
More information about the All-commits
mailing list