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);