mirror of
https://github.com/mhx/dwarfs.git
synced 2025-09-09 20:41:04 -04:00
test: use diskutil unmount
instead of umount
on macOS
This commit is contained in:
parent
bd5524792f
commit
bb4c3ca596
@ -604,13 +604,14 @@ class driver_runner {
|
|||||||
|
|
||||||
if (!mountpoint_.empty()) {
|
if (!mountpoint_.empty()) {
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
auto umount = dwarfs::test::find_binary("umount");
|
auto diskutil = dwarfs::test::find_binary("diskutil");
|
||||||
if (!umount) {
|
if (!diskutil) {
|
||||||
throw std::runtime_error("no umount binary found");
|
throw std::runtime_error("no diskutil binary found");
|
||||||
}
|
}
|
||||||
auto t0 = std::chrono::steady_clock::now();
|
auto t0 = std::chrono::steady_clock::now();
|
||||||
for (;;) {
|
for (;;) {
|
||||||
auto [out, err, ec] = subprocess::run(umount.value(), mountpoint_);
|
auto [out, err, ec] =
|
||||||
|
subprocess::run(diskutil.value(), "unmount", mountpoint_);
|
||||||
if (ec == 0) {
|
if (ec == 0) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user