Skip to content

Commit

Permalink
test: use diskutil unmount instead of umount on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
mhx committed Aug 13, 2024
1 parent 971543a commit 066d206
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions test/tools_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -604,13 +604,14 @@ class driver_runner {

if (!mountpoint_.empty()) {
#ifdef __APPLE__
auto umount = dwarfs::test::find_binary("umount");
if (!umount) {
throw std::runtime_error("no umount binary found");
auto diskutil = dwarfs::test::find_binary("diskutil");
if (!diskutil) {
throw std::runtime_error("no diskutil binary found");
}
auto t0 = std::chrono::steady_clock::now();
for (;;) {
auto [out, err, ec] = subprocess::run(umount.value(), mountpoint_);
auto [out, err, ec] =
subprocess::run(diskutil.value(), "unmount", mountpoint_);
if (ec == 0) {
break;
}
Expand Down

0 comments on commit 066d206

Please sign in to comment.