1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-28 17:52:42 +01:00

Send postponed test results to differential.

Summary:
Differential showed 'okay' as the arc unit status even when there were
postponed tests.

Test Plan:
Tested that test results were pushed to differential when there were
postponed tests.

Reviewed By: jungejason
Reviewers: epriestley, jungejason
CC: slawekbiel, aran, jungejason
Differential Revision: 417
This commit is contained in:
tuomaspelkonen 2011-06-08 16:36:17 -07:00
parent ffbc7aae62
commit dcc76bb58b
2 changed files with 11 additions and 4 deletions

View file

@ -244,6 +244,8 @@ EOTEXT
$unit = 'warn'; $unit = 'warn';
} else if ($unit_result === ArcanistUnitWorkflow::RESULT_SKIP) { } else if ($unit_result === ArcanistUnitWorkflow::RESULT_SKIP) {
$unit = 'skip'; $unit = 'skip';
} else if ($unit_result === ArcanistUnitWorkflow::RESULT_POSTPONED) {
$unit = 'postponed';
} else { } else {
$unit = 'none'; $unit = 'none';
} }

View file

@ -27,6 +27,7 @@ class ArcanistUnitWorkflow extends ArcanistBaseWorkflow {
const RESULT_UNSOUND = 1; const RESULT_UNSOUND = 1;
const RESULT_FAIL = 2; const RESULT_FAIL = 2;
const RESULT_SKIP = 3; const RESULT_SKIP = 3;
const RESULT_POSTPONED = 4;
private $unresolvedTests; private $unresolvedTests;
private $engine; private $engine;
@ -121,6 +122,7 @@ EOTEXT
$result_code = $result->getResult(); $result_code = $result->getResult();
if ($result_code == ArcanistUnitTestResult::RESULT_POSTPONED) { if ($result_code == ArcanistUnitTestResult::RESULT_POSTPONED) {
$postponed_count++; $postponed_count++;
$unresolved[] = $result;
} else { } else {
if ($this->engine->shouldEchoTestResults()) { if ($this->engine->shouldEchoTestResults()) {
echo ' '.$status_codes[$result_code].' '.$result->getName()."\n"; echo ' '.$status_codes[$result_code].' '.$result->getName()."\n";
@ -151,6 +153,9 @@ EOTEXT
break; break;
} else if ($result_code == ArcanistUnitTestResult::RESULT_UNSOUND) { } else if ($result_code == ArcanistUnitTestResult::RESULT_UNSOUND) {
$overall_result = self::RESULT_UNSOUND; $overall_result = self::RESULT_UNSOUND;
} else if ($result_code == ArcanistUnitTestResult::RESULT_POSTPONED &&
$overall_result != self::RESULT_UNSOUND) {
$overall_result = self::RESULT_POSTPONED;
} }
} }