]> khamidou — GitHub mirrors - arcanist.git/commitdiff
Add Delete Flag to Paths ignore mask
authorGareth Evans <garoevans@gmail.com>
Thu, 20 Jun 2013 14:35:18 +0000 (07:35 -0700)
committerepriestley <git@epriestley.com>
Thu, 20 Jun 2013 14:35:30 +0000 (07:35 -0700)
Summary:
When `arc diff` runs unit tests it uses all of the affected files as the base array of paths. These files may have been deleted. If the deleted file fits the test criteria `unit` will try and run the test and in some cases fail.

An example of this fataling is with PHPUnit;

> Fatal error: Uncaught exception 'Exception' with message 'JSON report file is em
pty, it probably means that phpunit failed to run tests. Try running arc unit wi
th --trace option and then run generated phpunit command yourself, you might get
 the answer.' in C:\Websites\facebook\arcanist\src\unit\engine\PhpunitResultPars
er.php on line 156

Test Plan: Re-ran the tests that were causing issues with `arc unit --rev HEAD^ --trace`

Reviewers: epriestley

Reviewed By: epriestley

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

src/unit/engine/PhpunitTestEngine.php

index 838278f6562ca9b2470d27716c927ec57384393f..a787298201e4d10a83dff41388c59b4059f54c56 100644 (file)
@@ -57,6 +57,9 @@ final class PhpunitTestEngine extends ArcanistBaseUnitTestEngine {
     $futures = array();
     $tmpfiles = array();
     foreach ($this->affectedTests as $class_path => $test_path) {
+      if(!Filesystem::pathExists($test_path)) {
+        continue;
+      }
       $json_tmp = new TempFile();
       $clover_tmp = null;
       $clover = null;