Changeset View
Changeset View
Standalone View
Standalone View
src/unit/engine/PhutilUnitTestEngine.php
Show First 20 Lines • Show All 164 Lines • ▼ Show 20 Lines | foreach ($this->getPaths() as $path) { | ||||
continue; | continue; | ||||
} | } | ||||
$library_name = phutil_get_library_name_for_root($library_root); | $library_name = phutil_get_library_name_for_root($library_root); | ||||
if (!$library_name) { | if (!$library_name) { | ||||
throw new Exception( | throw new Exception( | ||||
pht( | pht( | ||||
"Attempting to run unit tests on a libphutil library which has ". | "Attempting to run unit tests on a library which has ". | ||||
"not been loaded, at:\n\n". | "not been loaded, at:\n\n". | ||||
" %s\n\n". | " %s\n\n". | ||||
"This probably means one of two things:\n\n". | "Make sure this library is configured to load.\n\n". | ||||
" - You may need to add this library to %s.\n". | "(In rare cases, this may be because you are attempting to run ". | ||||
" - You may be running tests on a copy of libphutil or ". | "one copy of this software against a different copy of this ". | ||||
"arcanist using a different copy of libphutil or arcanist. ". | "software. This operation is not supported.)", | ||||
"This operation is not supported.\n", | $library_root)); | ||||
$library_root, | |||||
'.arcconfig.')); | |||||
} | } | ||||
$path = Filesystem::resolvePath($path, $root); | $path = Filesystem::resolvePath($path, $root); | ||||
$library_path = Filesystem::readablePath($path, $library_root); | $library_path = Filesystem::readablePath($path, $library_root); | ||||
if (!Filesystem::isDescendant($path, $library_root)) { | if (!Filesystem::isDescendant($path, $library_root)) { | ||||
// We have encountered some kind of symlink maze -- for instance, $path | // We have encountered some kind of symlink maze -- for instance, $path | ||||
// is some symlink living outside the library that links into some file | // is some symlink living outside the library that links into some file | ||||
Show All 34 Lines |