1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-09-20 08:58:55 +02:00

Use project root instead of library root in unit engine

This commit is contained in:
vrana 2012-06-05 21:08:52 -07:00
parent d016f81135
commit 52f8f49aef

View file

@ -26,6 +26,7 @@ final class PhutilUnitTestEngine extends ArcanistBaseUnitTestEngine {
public function run() { public function run() {
$bootloader = PhutilBootloader::getInstance(); $bootloader = PhutilBootloader::getInstance();
$project_root = $this->getWorkingCopy()->getProjectRoot();
$look_here = array(); $look_here = array();
@ -48,7 +49,7 @@ final class PhutilUnitTestEngine extends ArcanistBaseUnitTestEngine {
" operation is not supported."); " operation is not supported.");
} }
$path = Filesystem::resolvePath($path, dirname($library_root)); $path = Filesystem::resolvePath($path, $project_root);
if (!is_dir($path)) { if (!is_dir($path)) {
$path = dirname($path); $path = dirname($path);
@ -125,7 +126,7 @@ final class PhutilUnitTestEngine extends ArcanistBaseUnitTestEngine {
foreach ($run_tests as $test_class) { foreach ($run_tests as $test_class) {
$test_case = newv($test_class, array()); $test_case = newv($test_class, array());
$test_case->setEnableCoverage($enable_coverage); $test_case->setEnableCoverage($enable_coverage);
$test_case->setProjectRoot($this->getWorkingCopy()->getProjectRoot()); $test_case->setProjectRoot($project_root);
$test_case->setPaths($this->getPaths()); $test_case->setPaths($this->getPaths());
$results[] = $test_case->run(); $results[] = $test_case->run();
} }