Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/__tests__/PhutilFileLockTestCase.php
Show First 20 Lines • Show All 165 Lines • ▼ Show 20 Lines | while (!$future->isReady()) { | ||||
return $future; | return $future; | ||||
} | } | ||||
} | } | ||||
throw new Exception(pht('Unable to hold lock in external process!')); | throw new Exception(pht('Unable to hold lock in external process!')); | ||||
} | } | ||||
private function buildLockFuture($flags, $file) { | private function buildLockFuture($flags, $file) { | ||||
$root = dirname(phutil_get_library_root('phutil')); | $root = dirname(phutil_get_library_root('arcanist')); | ||||
$bin = $root.'/scripts/utils/lock.php'; | $bin = $root.'/support/unit/lock.php'; | ||||
// NOTE: Use `exec` so this passes on Ubuntu, where the default `dash` shell | // NOTE: Use `exec` so this passes on Ubuntu, where the default `dash` shell | ||||
// will eat any kills we send during the tests. | // will eat any kills we send during the tests. | ||||
$future = new ExecFuture('exec php %s %C %s', $bin, $flags, $file); | $future = new ExecFuture('exec php %s %C %s', $bin, $flags, $file); | ||||
$future->start(); | $future->start(); | ||||
return $future; | return $future; | ||||
} | } | ||||
} | } |