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

Add coverage access to differential.updateunitresults

Summary: We now support an optional coverage parameter.

Test Plan: ??? iiam

Reviewers: tuomaspelkonen, btrahan

Reviewed By: tuomaspelkonen

CC: aran, epriestley

Differential Revision: https://secure.phabricator.com/D1850
This commit is contained in:
epriestley 2012-03-09 15:45:23 -08:00
parent 6712dbb709
commit 366c59f805

View file

@ -28,11 +28,12 @@ extends ConduitAPIMethod {
public function defineParamTypes() {
return array(
'diff_id' => 'required diff_id',
'file' => 'required string',
'name' => 'required string',
'result' => 'required string',
'message' => 'required string',
'diff_id' => 'required diff_id',
'file' => 'required string',
'name' => 'required string',
'result' => 'required string',
'message' => 'required string',
'coverage' => 'required map<string, string>',
);
}
@ -58,6 +59,7 @@ extends ConduitAPIMethod {
$name = $request->getValue('name');
$message = $request->getValue('message');
$result = $request->getValue('result');
$coverage = $request->getValue('coverage', array());
$diff_property = id(new DifferentialDiffProperty())->loadOneWhere(
'diffID = %d AND name = %s',
@ -84,6 +86,7 @@ extends ConduitAPIMethod {
$unit_result['file'] = $file;
$unit_result['result'] = $result;
$unit_result['userdata'] = $message;
$unit_result['coverage'] = $coverage;
$unit_status = $result;
break;
}
@ -97,6 +100,7 @@ extends ConduitAPIMethod {
$unit_result['name'] = $name;
$unit_result['result'] = $result;
$unit_result['userdata'] = $message;
$unit_result['coverage'] = $coverage;
$unit_status = $result;
$unit_results[] = $unit_result;
}