[lit] Implement 'env' in the internal shell
authorReid Kleckner <reid@kleckner.net>
Mon, 20 Jul 2015 19:42:08 +0000 (19:42 +0000)
committerReid Kleckner <reid@kleckner.net>
Mon, 20 Jul 2015 19:42:08 +0000 (19:42 +0000)
commit8fd1953423a3990c0e00615c54650e0aceb95b8a
treecc9275c3c3aee1afe03f2947c184caff7cccf038
parentfccc20d417b7541397a2d95da0a1685c583b0f7e
[lit] Implement 'env' in the internal shell

The MSys 2 version of 'env' cannot be used to set 'TZ' in the
environment due to some portability hacks in the process spawning
compatibility layer[1]. This affects test/Object/archive-toc.test, which
tries to set TZ in the environment.

Other than that, this saves a subprocess invocation of a small unix
utility, which is makes the tests faster.

The internal shell does not support shell variable expansion, so this
idiom in the ASan tests isn't supported yet:
  RUN: env ASAN_OPTIONS=$ASAN_OPTIONS:opt=1 ...

[1] https://github.com/Alexpux/MSYS2-packages/issues/294

Differential Revision: http://reviews.llvm.org/D11350

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242696 91177308-0d34-0410-b5e6-96231b3b80d8
utils/lit/lit/TestRunner.py