mirror of
https://we.phorge.it/source/arcanist.git
synced 2024-11-29 18:22:41 +01:00
Add extraData field to test results
Summary: See discussion on T1630. extraData provides more scope for extensions to piggy-back more data on the test results and have that pulled up to the UI. We're using keys like "facebook:complexity" to store additional data as part of the test results. Test Plan: Nothing in the codebase touches extraData at the moment, so you'll just have to have faith/prove by inspection. Reviewers: vrana, nh, tuomaspelkonen, epriestley Reviewed By: epriestley CC: aran, epriestley Maniphest Tasks: T1630 Differential Revision: https://secure.phabricator.com/D3276
This commit is contained in:
parent
a0d4430271
commit
390bb280e1
2 changed files with 15 additions and 0 deletions
|
@ -35,6 +35,7 @@ final class ArcanistUnitTestResult {
|
||||||
private $result;
|
private $result;
|
||||||
private $duration;
|
private $duration;
|
||||||
private $userData;
|
private $userData;
|
||||||
|
private $extraData;
|
||||||
private $coverage;
|
private $coverage;
|
||||||
|
|
||||||
public function setName($name) {
|
public function setName($name) {
|
||||||
|
@ -73,6 +74,19 @@ final class ArcanistUnitTestResult {
|
||||||
return $this->userData;
|
return $this->userData;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* "extra data" allows an implementation to store additional
|
||||||
|
* key/value metadata along with the result of the test run.
|
||||||
|
*/
|
||||||
|
public function setExtraData(array $extra_data = null) {
|
||||||
|
$this->extraData = $extra_data;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getExtraData() {
|
||||||
|
return $this->extraData;
|
||||||
|
}
|
||||||
|
|
||||||
public function setCoverage($coverage) {
|
public function setCoverage($coverage) {
|
||||||
$this->coverage = $coverage;
|
$this->coverage = $coverage;
|
||||||
return $this;
|
return $this;
|
||||||
|
|
|
@ -1319,6 +1319,7 @@ EOTEXT
|
||||||
'result' => $test->getResult(),
|
'result' => $test->getResult(),
|
||||||
'userdata' => $test->getUserData(),
|
'userdata' => $test->getUserData(),
|
||||||
'coverage' => $test->getCoverage(),
|
'coverage' => $test->getCoverage(),
|
||||||
|
'extra' => $test->getExtraData(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue