1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Aggregate display of postponed tests

Summary:
Displaying each postponed test separately was spammy.
Now it will only display a single line with the total count

Test Plan:
~/local/arcanist/bin/arc unit --sandcastle-tests
35 tests to run.
Completed 'ParentInfoTestCase.php'
Interrupted 'MentionsUntagTestCase.php'
    PASS  ParentInfoTestCase
  POSTPONED  34 tests

Reviewed By: sgrimm
Reviewers: jungejason, sgrimm
CC: sgrimm
Revert Plan:
sure

Other Notes:

Differential Revision: 173
This commit is contained in:
slawekbiel 2011-04-28 11:46:20 -07:00
parent 8332d86ad2
commit d70e5db39e

View file

@ -115,14 +115,26 @@ EOTEXT
); );
$unresolved = array(); $unresolved = array();
$postponed_count = 0;
foreach ($results as $result) { foreach ($results as $result) {
$result_code = $result->getResult(); $result_code = $result->getResult();
echo $status_codes[$result_code].' '.$result->getName()."\n"; if ($result_code == ArcanistUnitTestResult::RESULT_POSTPONED) {
if ($result_code != ArcanistUnitTestResult::RESULT_PASS) { $postponed_count++;
echo $result->getUserData()."\n"; } else {
$unresolved[] = $result; echo $status_codes[$result_code].' '.$result->getName()."\n";
if ($result_code != ArcanistUnitTestResult::RESULT_PASS) {
echo $result->getUserData()."\n";
$unresolved[] = $result;
}
} }
} }
if ($postponed_count) {
echo sprintf("%s %d %s\n",
$status_codes[ArcanistUnitTestResult::RESULT_POSTPONED],
$postponed_count,
($postponed_count > 1)?'tests':'test');
}
$this->unresolvedTests = $unresolved; $this->unresolvedTests = $unresolved;
$overall_result = self::RESULT_OKAY; $overall_result = self::RESULT_OKAY;