Changeset View
Changeset View
Standalone View
Standalone View
src/filesystem/__tests__/PhutilFileLockTestCase.php
| Show First 20 Lines • Show All 166 Lines • ▼ Show 20 Lines | while (!$future->isReady()) { | ||||
| } | } | ||||
| } | } | ||||
| 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('arcanist')); | $root = dirname(phutil_get_library_root('arcanist')); | ||||
| $bin = $root.'/scripts/utils/lock.php'; | $bin = $root.'/support/test/lock-file.php'; | ||||
| $flags = (array)$flags; | |||||
| // 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 -f %R -- %Ls %R', $bin, $flags, $file); | ||||
| $future->start(); | $future->start(); | ||||
| return $future; | return $future; | ||||
| } | } | ||||
| } | } | ||||