]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Prevent double rendering of unit test results
authorJoshua Spence <josh@freelancer.com>
Tue, 17 Nov 2015 20:19:40 +0000 (07:19 +1100)
committerJoshua Spence <josh@freelancer.com>
Tue, 17 Nov 2015 20:20:26 +0000 (07:20 +1100)
Summary: D14037 had the logic slightly wrong and unit test results are now being double rendered.

Test Plan: Ran a unit test with `arc unit -- path/to/test` and saw the results rendered only once.

Reviewers: #blessed_reviewers, epriestley

Reviewed By: #blessed_reviewers, epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14495

src/unit/engine/ArcanistConfigurationDrivenUnitTestEngine.php

index 652a46d2e4e4545e3f05d8c5f87f9e1ffbddb7a8..6cc659af32cd6af5fd3903c674787bc39d6ff608 100644 (file)
@@ -148,7 +148,9 @@ final class ArcanistConfigurationDrivenUnitTestEngine
         $all_results[] = $results;
 
         foreach ($results as $result) {
-          if ($engine->shouldEchoTestResults()) {
+          // If the proxied engine renders its own test results then there
+          // is no need to render them again here.
+          if (!$engine->shouldEchoTestResults()) {
             echo $renderer->renderUnitResult($result);
           }
         }