Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit 32a5348

Browse files
author
Jeff Verkoeyen
committed
Set working directory of futures to the project's root directory.
1 parent db14259 commit 32a5348

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

engine/XcodeUnitTestEngine.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,7 @@ public function run() {
119119

120120
if (!empty($this->preBuildCommand)) {
121121
$future = new ExecFuture($this->preBuildCommand);
122+
$future->setCWD(Filesystem::resolvePath($this->getWorkingCopy()->getProjectRoot()));
122123
$future->resolvex();
123124
}
124125

@@ -141,6 +142,7 @@ public function run() {
141142
// Get the OBJROOT
142143
$future = new ExecFuture('%C %C -showBuildSettings test',
143144
$this->xcodebuildBinary, implode(' ', $xcodeargs));
145+
$future->setCWD(Filesystem::resolvePath($this->getWorkingCopy()->getProjectRoot()));
144146
list(, $settings_stdout, ) = $future->resolve();
145147
if (!preg_match('/OBJROOT = (.+)/', $settings_stdout, $matches)) {
146148
throw new Exception('Unable to find OBJROOT configuration.');
@@ -154,6 +156,7 @@ public function run() {
154156

155157
$future = new ExecFuture('%C show -use-color=false -instr-profile "%C" "%C"',
156158
$this->covBinary, $profdata, $product);
159+
$future->setCWD(Filesystem::resolvePath($this->getWorkingCopy()->getProjectRoot()));
157160

158161
try {
159162
list($coverage, $coverage_error) = $future->resolvex();

0 commit comments

Comments
 (0)