1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-23 14:00:56 +01:00

Don't mark diff as "Unit Tests Skipped" when posponed test was skipped

Summary:
Following logic at https://secure.phabricator.com/diffusion/ARC/browse/master/src/workflow/unit/ArcanistUnitWorkflow.php;ea0f737e85644d5a$242-255.

Also unrequire coverage.

Test Plan:
  echo '{"diff_id": 1, "file": "empty", "name": "name", "result": "skip", "message": "test"}' | arc call-conduit differential.updateunitresults

Reviewers: nh, epriestley

Reviewed By: epriestley

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D2231
This commit is contained in:
vrana 2012-04-13 12:56:19 -07:00
parent ded641ae32
commit cec641a81e

View file

@ -33,7 +33,7 @@ final class ConduitAPI_differential_updateunitresults_Method
'name' => 'required string',
'result' => 'required string',
'message' => 'required string',
'coverage' => 'required map<string, string>',
'coverage' => 'map<string, string>',
);
}
@ -124,15 +124,16 @@ final class ConduitAPI_differential_updateunitresults_Method
DifferentialUnitTestResult::RESULT_FAIL =>
DifferentialUnitStatus::UNIT_FAIL,
DifferentialUnitTestResult::RESULT_SKIP =>
DifferentialUnitStatus::UNIT_SKIP,
DifferentialUnitStatus::UNIT_OKAY,
DifferentialUnitTestResult::RESULT_POSTPONED =>
DifferentialUnitStatus::UNIT_POSTPONED);
if ($diff->getUnitStatus() == DifferentialUnitStatus::UNIT_POSTPONED) {
$status_code =
idx($status_codes, $unit_status, DifferentialUnitStatus::UNIT_NONE);
if ($postponed_count == 0 ||
$unit_status != DifferentialUnitTestResult::RESULT_PASS) {
$diff->setUnitStatus(
idx($status_codes, $unit_status, DifferentialUnitStatus::UNIT_NONE));
$status_code != DifferentialUnitStatus::UNIT_OKAY) {
$diff->setUnitStatus($status_code);
$diff->save();
}
}