mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-23 11:13:28 +01:00
Use os.path.realpath when tracking the cwd.
This is needed by TestCases/Posix/coverage-direct.cc The problem is that the test does: mkdir <dir> cd <dir> cd .. rm -rf <dir> <more commands> the current directory currently looks like "/.../<dir>/../" which doesn't exist when dir is deleted. at some point we should probably switch to using the os current directory (specially if we want to add subshell), but this is a small incremental improvement. llvm-svn: 299113
This commit is contained in:
parent
74c3cc2d1c
commit
5e9a87e6cb
@ -252,7 +252,7 @@ def _executeShCmd(cmd, shenv, results, timeoutHelper):
|
||||
if os.path.isabs(newdir):
|
||||
shenv.cwd = newdir
|
||||
else:
|
||||
shenv.cwd = os.path.join(shenv.cwd, newdir)
|
||||
shenv.cwd = os.path.realpath(os.path.join(shenv.cwd, newdir))
|
||||
# The cd builtin always succeeds. If the directory does not exist, the
|
||||
# following Popen calls will fail instead.
|
||||
return 0
|
||||
|
Loading…
Reference in New Issue
Block a user