From 1d5ee03fdbbfc8f9b6af497434b69b12d69ac22a Mon Sep 17 00:00:00 2001 From: Gareth Evans Date: Thu, 20 Jun 2013 07:35:18 -0700 Subject: [PATCH] Add Delete Flag to Paths ignore mask 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 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/unit/engine/PhpunitTestEngine.php b/src/unit/engine/PhpunitTestEngine.php index 838278f6..a7872982 100644 --- a/src/unit/engine/PhpunitTestEngine.php +++ b/src/unit/engine/PhpunitTestEngine.php @@ -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; -- 2.43.0