llvm.org GIT mirror llvm / 8d4aa1d
[Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows. This patch propogates the environment variable SYSTEMDRIVE on Windows when running the unit tests. This prevents the creation of a directory named "%SystemDrive%" when running the unit tests from FileSystemTest that use the function llvm::sys::fs::remove_directories which in turn uses SHFileOperationW. It is within SHFileOperationW that this environment variable may be used and if undefined causes the creation of a "%SystemDrive%" directory in the current directory. Differential Revision: https://reviews.llvm.org/D32910 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@302409 91177308-0d34-0410-b5e6-96231b3b80d8 Andrew Ng 2 years ago
1 changed file(s) with 4 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
4141 if sys.platform in ['win32', 'cygwin'] and os.path.isdir(config.shlibdir):
4242 config.environment['PATH'] = os.path.pathsep.join((
4343 config.shlibdir, config.environment['PATH']))
45 # Win32 may use %SYSTEMDRIVE% during file system shell operations, so propogate.
46 if sys.platform == 'win32' and 'SYSTEMDRIVE' in os.environ:
47 config.environment['SYSTEMDRIVE'] = os.environ['SYSTEMDRIVE']
4549 ###