Changeset View
Changeset View
Standalone View
Standalone View
src/unit/engine/XUnitTestEngine.php
Show First 20 Lines • Show All 249 Lines • ▼ Show 20 Lines | private function generateProjects() { | ||||
try { | try { | ||||
$regenerate_future->resolvex(); | $regenerate_future->resolvex(); | ||||
$result->setResult(ArcanistUnitTestResult::RESULT_PASS); | $result->setResult(ArcanistUnitTestResult::RESULT_PASS); | ||||
} catch (CommandException $exc) { | } catch (CommandException $exc) { | ||||
if ($exc->getError() > 1) { | if ($exc->getError() > 1) { | ||||
throw $exc; | throw $exc; | ||||
} | } | ||||
$result->setResult(ArcanistUnitTestResult::RESULT_FAIL); | $result->setResult(ArcanistUnitTestResult::RESULT_FAIL); | ||||
$result->setUserdata($exc->getStdout()); | $result->setUserData($exc->getStdout()); | ||||
} | } | ||||
$result->setDuration(microtime(true) - $regenerate_start); | $result->setDuration(microtime(true) - $regenerate_start); | ||||
$results[] = $result; | $results[] = $result; | ||||
return $results; | return $results; | ||||
} | } | ||||
/** | /** | ||||
Show All 29 Lines | foreach ($iterator as $test_assembly => $future) { | ||||
try { | try { | ||||
$future->resolvex(); | $future->resolvex(); | ||||
$result->setResult(ArcanistUnitTestResult::RESULT_PASS); | $result->setResult(ArcanistUnitTestResult::RESULT_PASS); | ||||
} catch (CommandException $exc) { | } catch (CommandException $exc) { | ||||
if ($exc->getError() > 1) { | if ($exc->getError() > 1) { | ||||
throw $exc; | throw $exc; | ||||
} | } | ||||
$result->setResult(ArcanistUnitTestResult::RESULT_FAIL); | $result->setResult(ArcanistUnitTestResult::RESULT_FAIL); | ||||
$result->setUserdata($exc->getStdout()); | $result->setUserData($exc->getStdout()); | ||||
$build_failed = true; | $build_failed = true; | ||||
} | } | ||||
$result->setDuration(microtime(true) - $build_start); | $result->setDuration(microtime(true) - $build_start); | ||||
$results[] = $result; | $results[] = $result; | ||||
} | } | ||||
return $results; | return $results; | ||||
} | } | ||||
▲ Show 20 Lines • Show All 153 Lines • Show Last 20 Lines |