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

Commit

Permalink
Merge branch 'develop' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeff Verkoeyen committed May 4, 2016
2 parents 97e7577 + 888cd4d commit 4ab1f79
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 3.0.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).

## 3.0.2

* Resolves crash caused by referencing the wrong stderr variable. The error was
Expand Down
15 changes: 9 additions & 6 deletions engine/XcodeUnitTestEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,15 +148,18 @@ public function run() {
if (!preg_match('/OBJROOT = (.+)/', $settings_stdout, $matches)) {
throw new Exception('Unable to find OBJROOT configuration.');
}

$objroot = $matches[1];
$covroot = $objroot."/CodeCoverage/".$this->xcodebuild['scheme'];
$profdata = $covroot."/Coverage.profdata";
// TODO(featherless): Find a better way to identify which Product was built.
$product = $covroot."/Products/Debug-iphonesimulator/".$this->coverage['product'];

$future = new ExecFuture("find %C -name Coverage.profdata", $objroot);
list(, $coverage_stdout, ) = $future->resolve();
$profdata_path = explode("\n", $coverage_stdout)[0];

$future = new ExecFuture("find %C | grep %C", $objroot, $this->coverage['product']);
list(, $product_stdout, ) = $future->resolve();
$product_path = explode("\n", $product_stdout)[0];

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

try {
Expand Down

0 comments on commit 4ab1f79

Please sign in to comment.