fix up test ProcessOpenFilesTest.test_sanity

Summary: It fails on some platforms because of permissions, let's just check if file path is not empty and is absolute

Reviewed By: marekcirkos

Differential Revision: D14086996

fbshipit-source-id: 98068e4b93e6be12a2392345fa74b547d26a2d43
This commit is contained in:
Alexander Kindyakov 2019-02-15 07:21:08 -08:00 committed by Facebook Github Bot
parent 464fa46788
commit 676820998e

View File

@ -50,12 +50,7 @@ bool checkProcessOpenFilePath(std::string const& value){
return true;
}
auto const path = boost::filesystem::path(value);
// On macosx unlinked pathnames is not marked
if (isPlatform(PlatformType::TYPE_OSX)) {
return !path.empty() && path.is_absolute();
}
auto const status = boost::filesystem::status(path);
return boost::filesystem::exists(status);
return !path.empty() && path.is_absolute();
}
}