1

I'm looking to use Slather to export unit test code coverage to TeamCity, however I am running into issues even getting it to run, and I'm a little confused as I'm not finding other people encountering this error. So hopefully someone can help me. I'm a build engineer, not XCode developer, and our devs don't seem to know what could be causing it.

Anyway, to trial Slather, I was given a new Mac, so I installed RVM and Ruby 2.4.1. I then installed the Slather gem, which all was quite easy and fast.

I built the XCode project, ran the unit tests and saw XCode displaying the code coverage data in the IDE.

In my terminal I ran the slather coverage command, and it returns the error:

Slathering...
/Users/me/.rvm/gems/ruby-2.4.1/gems/CFPropertyList-2.3.5/lib/cfpropertylist/rbCFPropertyList.rb:349:in `load`: File /Library/Developer/CommandLineTools/../Info.plist not readable! (IOError).

So my question is what am I missing?

The Mac is new, I only added XCode v8.2.1, RVM, Ruby and Slather. Slather pulled in all the dependencies it needed. The XCode project has test coverage turned on, and there is nothing in the Slather site mentioning that I need to modify plist reference paths in the project settings.

I even went to a blog site and tried their demo project for using Slather https://cocoacasts.com/how-to-generate-code-coverage-reports-in-xcode-with-slather/ and I get the same error with their project also.

It seems Slather just works for most other people, so hoping its just some really simple small thing that I need to setup on this Mac environment.

Eric Aya
  • 69,473
  • 35
  • 181
  • 253
Jason K
  • 71
  • 1
  • 8

1 Answers1

1

Sorry to be posting an answer to my own question, but I found out what I was doing wrong and it was an environment issue.

The solution was found from this answer: StackOverflow XCode Select Active Developer Directory Error

The issue was I had opened XCode from a XIP and was essentially running it from the Downloads folder as opposed to the Applications folder. However the XCode commandline tools were expecting it to be in Applications. Once I put XCode in the correct location, Slather worked fine.

Basically a rookie OSX error by a Windows user.

Jason K
  • 71
  • 1
  • 8