This is an archive of the discontinued LLVM Phabricator instance.

[Lit] Fix to prevent creation of "%SystemDrive%" directory on Windows.
ClosedPublic

Authored by andrewng on May 5 2017, 8:20 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

andrewng created this revision.May 5 2017, 8:20 AM
zturner edited edge metadata.May 5 2017, 8:24 AM

I don't disbelieve you, but do you have any thoughts about why I've never seen this when running tests locally?

I don't disbelieve you, but do you have any thoughts about why I've never seen this when running tests locally?

Yes, this is a bit of a strange one. It has only started happening fairly recently (a week or 2), so we suspect that it might be a Windows change that's triggered it. I'm running on Windows 10 Pro x64 1607 build 14393.1066.

rnk accepted this revision.May 5 2017, 8:47 AM

lgtm

This revision is now accepted and ready to land.May 5 2017, 8:47 AM
This revision was automatically updated to reflect the committed changes.