From 5296bf529fe59091bb282fa44016e01efee59b28 Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 6 Mar 2013 13:39:31 -0800 Subject: [PATCH] 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 --- src/unit/engine/phutil/ArcanistPhutilTestCase.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) 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; }