]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Fix lint tests after D3756
authorvrana <jakubv@fb.com>
Sat, 20 Oct 2012 13:16:19 +0000 (06:16 -0700)
committervrana <jakubv@fb.com>
Sat, 20 Oct 2012 13:19:00 +0000 (06:19 -0700)
Test Plan:
Threw normal exception, saw failed test.
Threw usage exception, saw skipped test.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin
Differential Revision: https://secure.phabricator.com/D3761

src/lint/linter/__tests__/ArcanistLinterTestCase.php

index ece66542e6456104d4d1cdba03b9e98e2f901483..a49745610e384b4afc05386220cdb88e60964798 100644 (file)
@@ -100,10 +100,18 @@ abstract class ArcanistLinterTestCase extends ArcanistTestCase {
 
     } catch (ArcanistPhutilTestTerminatedException $ex) {
       throw $ex;
-    } catch (ArcanistUsageException $ex) {
-      $this->assertSkipped($ex->getMessage());
     } catch (Exception $exception) {
       $caught_exception = true;
+      if ($exception instanceof PhutilAggregateException) {
+        $caught_exception = false;
+        foreach ($exception->getExceptions() as $ex) {
+          if ($ex instanceof ArcanistUsageException) {
+            $this->assertSkipped($ex->getMessage());
+          } else {
+            $caught_exception = true;
+          }
+        }
+      }
       $exception_message = $exception->getMessage()."\n\n".
                            $exception->getTraceAsString();
     }