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

Commit 4ab1f79

Browse files
author
Jeff Verkoeyen
committed
Merge branch 'develop' into stable
2 parents 97e7577 + 888cd4d commit 4ab1f79

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
## 3.0.3
2+
3+
* Resolved coverage failure with Xcode 7.3 and newer. Thanks to [aelam](https://github.com/aelam) for filing [#2](https://github.com/google/arc-xcode-test-engine/issues/2).
4+
15
## 3.0.2
26

37
* Resolves crash caused by referencing the wrong stderr variable. The error was

engine/XcodeUnitTestEngine.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,15 +148,18 @@ public function run() {
148148
if (!preg_match('/OBJROOT = (.+)/', $settings_stdout, $matches)) {
149149
throw new Exception('Unable to find OBJROOT configuration.');
150150
}
151-
152151
$objroot = $matches[1];
153-
$covroot = $objroot."/CodeCoverage/".$this->xcodebuild['scheme'];
154-
$profdata = $covroot."/Coverage.profdata";
155-
// TODO(featherless): Find a better way to identify which Product was built.
156-
$product = $covroot."/Products/Debug-iphonesimulator/".$this->coverage['product'];
152+
153+
$future = new ExecFuture("find %C -name Coverage.profdata", $objroot);
154+
list(, $coverage_stdout, ) = $future->resolve();
155+
$profdata_path = explode("\n", $coverage_stdout)[0];
156+
157+
$future = new ExecFuture("find %C | grep %C", $objroot, $this->coverage['product']);
158+
list(, $product_stdout, ) = $future->resolve();
159+
$product_path = explode("\n", $product_stdout)[0];
157160

158161
$future = new ExecFuture('%C show -use-color=false -instr-profile "%C" "%C"',
159-
$this->covBinary, $profdata, $product);
162+
$this->covBinary, $profdata_path, $product_path);
160163
$future->setCWD(Filesystem::resolvePath($this->getWorkingCopy()->getProjectRoot()));
161164

162165
try {

0 commit comments

Comments
 (0)