]> granicus.if.org Git - llvm/commit
[lit] Check for accidental external command calls
authorJoel E. Denny <jdenny.ornl@gmail.com>
Mon, 19 Aug 2019 22:59:37 +0000 (22:59 +0000)
committerJoel E. Denny <jdenny.ornl@gmail.com>
Mon, 19 Aug 2019 22:59:37 +0000 (22:59 +0000)
commit0fb951d92e6d2157ffc9005371984869c2c20d24
tree28f5bcbd0a446ba7f885d764445e603521cc9d85
parente104086ec98028b419b9b634497cbb52e814e4aa
[lit] Check for accidental external command calls

This patch extends lit's test suite to check that lit's internal shell
doesn't accidentally execute internal commands as external commands.
It does so by putting fake failing versions of those commands in
`PATH` while the entire lit test suite is running.  Without the fixes
in D65697 but with its tests, this approach catches accidental
external `env` calls.

Reviewed By: probinson

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

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@369309 91177308-0d34-0410-b5e6-96231b3b80d8
utils/lit/tests/Inputs/fake-externals/cd [new file with mode: 0755]
utils/lit/tests/Inputs/fake-externals/diff [new file with mode: 0755]
utils/lit/tests/Inputs/fake-externals/env [new file with mode: 0755]
utils/lit/tests/Inputs/fake-externals/export [new file with mode: 0755]
utils/lit/tests/Inputs/fake-externals/fake_external.py [new file with mode: 0644]
utils/lit/tests/Inputs/fake-externals/mkdir [new file with mode: 0755]
utils/lit/tests/Inputs/fake-externals/rm [new file with mode: 0755]
utils/lit/tests/lit.cfg