From 32a5348aef5fa5fc92cf9e3791576174e50b97fb Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Wed, 27 Apr 2016 10:46:36 -0400 Subject: [PATCH 1/2] Set working directory of futures to the project's root directory. --- engine/XcodeUnitTestEngine.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/engine/XcodeUnitTestEngine.php b/engine/XcodeUnitTestEngine.php index e63a5ad..814e578 100644 --- a/engine/XcodeUnitTestEngine.php +++ b/engine/XcodeUnitTestEngine.php @@ -119,6 +119,7 @@ public function run() { if (!empty($this->preBuildCommand)) { $future = new ExecFuture($this->preBuildCommand); + $future->setCWD(Filesystem::resolvePath($this->getWorkingCopy()->getProjectRoot())); $future->resolvex(); } @@ -141,6 +142,7 @@ public function run() { // Get the OBJROOT $future = new ExecFuture('%C %C -showBuildSettings test', $this->xcodebuildBinary, implode(' ', $xcodeargs)); + $future->setCWD(Filesystem::resolvePath($this->getWorkingCopy()->getProjectRoot())); list(, $settings_stdout, ) = $future->resolve(); if (!preg_match('/OBJROOT = (.+)/', $settings_stdout, $matches)) { throw new Exception('Unable to find OBJROOT configuration.'); @@ -154,6 +156,7 @@ public function run() { $future = new ExecFuture('%C show -use-color=false -instr-profile "%C" "%C"', $this->covBinary, $profdata, $product); + $future->setCWD(Filesystem::resolvePath($this->getWorkingCopy()->getProjectRoot())); try { list($coverage, $coverage_error) = $future->resolvex(); From 0a412f13f5f23030fa0e34ca3d61c702d18baf5f Mon Sep 17 00:00:00 2001 From: Jeff Verkoeyen Date: Wed, 27 Apr 2016 10:48:22 -0400 Subject: [PATCH 2/2] Update CHANGELOG.md. --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5e93d2a..440cd58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +## 3.0.0 + +* Commands now always run from the root directory of the project rather than from the shell's + current working directory. This may be a breaking change. + ## 2.1.1 * Improved overall test parsing time by approximately 50%.