[Support] Fix unit test for fs::is_local
authorPetar Jovanovic <petar.jovanovic@mips.com>
Wed, 8 May 2019 14:42:13 +0000 (14:42 +0000)
committerPetar Jovanovic <petar.jovanovic@mips.com>
Wed, 8 May 2019 14:42:13 +0000 (14:42 +0000)
commit4964e3837e406e6375488fd9ecad82bea2a1881b
tree9de7badfc8f42d8f7f2104f7450986f9d9c0aa3b
parent5b6dda33d1227e9f9c2a3ec8464a7ddd90df45d2
[Support] Fix unit test for fs::is_local

Close the temporary file after the test is done using it.
If it is not closed and the file was created on NFS, it will cause the test
to fail. The problem happens in the cleanup process afterwards. It first
tries to delete the file but it is not really deleted. Afterwards, the
program fails to delete the directory containing the file, causing the whole
test to fail.

Patch by Milos Stojanovic.

llvm-svn: 360259
llvm/unittests/Support/Path.cpp