mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +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:
parent
ded641ae32
commit
cec641a81e
1 changed files with 6 additions and 5 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue