[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)
commitedd9b6ef36f8f9f480eb3e72d6eb9794ef0ef656
treeba99779b6d529446603cd44aeab43a306f6a26b4
parent1aa4567712ba897ce8aaf3573aa85f40fc375c44
[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

llvm-svn: 242696
llvm/utils/lit/lit/TestRunner.py