Skip to content

Commit

Permalink
Merge pull request SlatherOrg#169 from ksuther/xcode73-fix
Browse files Browse the repository at this point in the history
Updated profdata_coverage_dir to work with Xcode 7.3
  • Loading branch information
neonichu authored and keatongreve committed Mar 23, 2016
1 parent 0550016 commit 92d7b25
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# CHANGELOG

## master
* Xcode 7.3 compatibility (updated path returned by `profdata_coverage_dir`)
[Kent Sutherland](https://github.com/ksuther)
[#125](https://github.com/SlatherOrg/slather/issues/125), [#169](https://github.com/SlatherOrg/slather/pull/169)

* Improve matching of xctest bundles when using `--binary-basename`
[Kent Sutherland](https://github.com/ksuther)
[#167](https://github.com/SlatherOrg/slather/pull/167)
Expand Down
5 changes: 5 additions & 0 deletions lib/slather/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ def profdata_coverage_dir
dir = Dir["#{build_directory}/**/#{self.products.first.name}"].first
end

if dir == nil
# Xcode 7.3 moved the location of Coverage.profdata
dir = Dir[File.join("#{build_directory}","/**/CodeCoverage")].first
end

raise StandardError, "No coverage directory found. Are you sure your project is setup for generating coverage files? Try `slather setup your/project.xcodeproj`" unless dir != nil
dir
end
Expand Down

0 comments on commit 92d7b25

Please sign in to comment.