[PATCH] D31550: Let the OS take case of the current working directory

Rafael Ávila de Espíndola via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 31 14:31:03 PDT 2017


rafael created this revision.
Herald added a reviewer: modocache.

This make the internal shell a bit more like a regular shell. When 'cd' is executed, it just use chdir for example. This is more reliable as it is really hard to audit everything that might use the current working directory.

This works as is because we always chdir at the start of a test execution.

The next steps probably are

- Change the environment to be managed the same way.
- Implement export
- Implement environment variables expansion like $PATH
- Maybe use subprocess.run to have an fully isolated process for each test run. I think this is pretty much necessary if we are to implement subshells


https://reviews.llvm.org/D31550

Files:
  llvm/utils/lit/lit/ShCommands.py
  llvm/utils/lit/lit/TestRunner.py

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31550.93706.patch
Type: text/x-patch
Size: 5750 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170331/1ed09661/attachment.bin>


More information about the llvm-commits mailing list