Fix cryfs-cli-test on Mac OS X

This commit is contained in:
Sebastian Messmer 2017-08-24 21:58:41 +01:00
parent 4da81fdbef
commit f951f41877

View File

@ -64,8 +64,12 @@ public:
std::thread unmountThread([&mountDir] {
int returncode = -1;
while (returncode != 0) {
#ifdef __APPLE__
returncode = cpputils::Subprocess::callAndGetReturnCode(std::string("umount ") + mountDir.c_str() + " 2>/dev/null");
#else
returncode = cpputils::Subprocess::callAndGetReturnCode(std::string("fusermount -u ") + mountDir.c_str() + " 2>/dev/null");
std::this_thread::sleep_for(std::chrono::milliseconds(50)); // TODO Is this the test case duration? Does a shorter interval make the test case faster?
#endif
//std::this_thread::sleep_for(std::chrono::milliseconds(50)); // TODO Is this the test case duration? Does a shorter interval make the test case faster?
}
});
testing::internal::CaptureStdout();