Page Menu
Home
Phabricator
Search
Configure Global Search
Log In
Paste
P2078
arc-unit-sorting
Active
Public
Actions
Authored by
richardvanvelzen
on Nov 6 2017, 12:37 PM.
Edit Paste
Archive Paste
View Raw File
Subscribe
Mute Notifications
Award Token
Flag For Later
Tags
None
Referenced Files
F5261937: arc-unit-sorting
Nov 6 2017, 12:37 PM
2017-11-06 12:37:43 (UTC+0)
Subscribers
None
diff --git a/src/unit/ArcanistUnitTestResult.php b/src/unit/ArcanistUnitTestResult.php
index ec25c20f..9a5f6d78 100644
--- a/src/unit/ArcanistUnitTestResult.php
+++ b/src/unit/ArcanistUnitTestResult.php
@@ -174,6 +174,13 @@ final class ArcanistUnitTestResult extends Phobject {
);
}
+ public function getSortVector() {
+ return (new PhutilSortVector())
+ ->addInt($this->getResult() === self::RESULT_PASS ? 0 : 1)
+ ->addString($this->getResult())
+ ->addInt($this->getDuration() * 1000);
+ }
+
public static function getAllResultCodes() {
return array(
self::RESULT_PASS,
diff --git a/src/workflow/ArcanistUnitWorkflow.php b/src/workflow/ArcanistUnitWorkflow.php
index 00ef8a59..f8eb7488 100644
--- a/src/workflow/ArcanistUnitWorkflow.php
+++ b/src/workflow/ArcanistUnitWorkflow.php
@@ -165,6 +165,7 @@ EOTEXT
$this->engine->setEnableCoverage($enable_coverage);
$results = $this->engine->run();
+ $results = msortv($results, 'getSortVector');
$this->validateUnitEngineResults($this->engine, $results);
Event Timeline
richardvanvelzen
edited the content of this paste.
(Show Details)
Nov 6 2017, 12:37 PM
2017-11-06 12:37:43 (UTC+0)
richardvanvelzen
changed the title of this paste from untitled to
arc-unit-sorting
.
richardvanvelzen
updated the paste's language from
autodetect
to
autodetect
.
Log In to Comment