Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Files
F15520556
D13788.id33307.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
1 KB
Referenced Files
None
Subscribers
None
D13788.id33307.diff
View Options
diff --git a/src/unit/ArcanistUnitTestResult.php b/src/unit/ArcanistUnitTestResult.php
--- a/src/unit/ArcanistUnitTestResult.php
+++ b/src/unit/ArcanistUnitTestResult.php
@@ -152,4 +152,68 @@
);
}
+ public static function getAllResultCodes() {
+ return array(
+ self::RESULT_PASS,
+ self::RESULT_FAIL,
+ self::RESULT_SKIP,
+ self::RESULT_BROKEN,
+ self::RESULT_UNSOUND,
+ );
+ }
+
+ public static function getResultCodeName($result_code) {
+ $spec = self::getResultCodeSpec($result_code);
+ if (!$spec) {
+ return null;
+ }
+ return idx($spec, 'name');
+ }
+
+ public static function getResultCodeDescription($result_code) {
+ $spec = self::getResultCodeSpec($result_code);
+ if (!$spec) {
+ return null;
+ }
+ return idx($spec, 'description');
+ }
+
+ private static function getResultCodeSpec($result_code) {
+ $specs = self::getResultCodeSpecs();
+ return idx($specs, $result_code);
+ }
+
+ private static function getResultCodeSpecs() {
+ return array(
+ self::RESULT_PASS => array(
+ 'name' => pht('Pass'),
+ 'description' => pht(
+ 'The test passed.'),
+ ),
+ self::RESULT_FAIL => array(
+ 'name' => pht('Fail'),
+ 'description' => pht(
+ 'The test failed.'),
+ ),
+ self::RESULT_SKIP => array(
+ 'name' => pht('Skip'),
+ 'description' => pht(
+ 'The test was not executed.'),
+ ),
+ self::RESULT_BROKEN => array(
+ 'name' => pht('Broken'),
+ 'description' => pht(
+ 'The test failed in an abnormal or severe way. For example, the '.
+ 'harness crashed instead of reporting a failure.'),
+ ),
+ self::RESULT_UNSOUND => array(
+ 'name' => pht('Unsound'),
+ 'description' => pht(
+ 'The test failed, but this change is probably not what broke it. '.
+ 'For example, it might have already been failing.'),
+ ),
+ );
+ }
+
+
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Apr 21, 7:07 AM (3 d, 19 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
7713148
Default Alt Text
D13788.id33307.diff (1 KB)
Attached To
Mode
D13788: Add more information about Harbormaster/Unit result codes to Arcanist
Attached
Detach File
Event Timeline
Log In to Comment