From: epriestley Date: Wed, 6 Mar 2013 21:39:31 +0000 (-0800) Subject: Fix bug with `arc unit --everything` when coverage is available X-Git-Url: http://git.khamidou.com/?a=commitdiff_plain;h=5296bf529fe59091bb282fa44016e01efee59b28;p=arcanist.git Fix bug with `arc unit --everything` when coverage is available Summary: We don't set $paths when running --everything. Test Plan: Ran `arc unit --everything` with coverage. Reviewers: vrana Reviewed By: vrana CC: aran Differential Revision: https://secure.phabricator.com/D5260 --- diff --git a/src/unit/engine/phutil/ArcanistPhutilTestCase.php b/src/unit/engine/phutil/ArcanistPhutilTestCase.php index 3f7d4507..b1cef23a 100644 --- a/src/unit/engine/phutil/ArcanistPhutilTestCase.php +++ b/src/unit/engine/phutil/ArcanistPhutilTestCase.php @@ -508,8 +508,12 @@ abstract class ArcanistPhutilTestCase { $coverage[substr($file, strlen($this->projectRoot) + 1)] = $str; } - // Only keep coverage information for files modified by the change. - $coverage = array_select_keys($coverage, $this->paths); + // Only keep coverage information for files modified by the change. In + // the case of --everything, we won't have paths, so just return all the + // coverage data. + if ($this->paths) { + $coverage = array_select_keys($coverage, $this->paths); + } return $coverage; }