After much research on this topic the problem seems to be with xcodebuild and a time out that Apple has in place. There seems to be lots of people seeing this issue. I’m not entirely sure what your setup is but as for mine I was running a tests scheme. This scheme was a combination of five applications in our suite that have shared components. Running this scheme all at once to generate coverage was working for quite some time. At some point we passed the threshold that put us over the time out. This timeout seems to start before compile time and expect the app to open in 120 seconds. The way that I’ve managed to work around this was to split out my tests. Rather than run all app tests in a single scheme I now run tests for each individual app and our components separately. This results in the derived data containing coverage reports for each app which we combine into a single file to send to our coverage report system.
Again I’m not sure that this solution fits your situation if it’s a single app that needs to compile fully to run tests you may not be able to run it this way. But it’s something to think about. Splitting out test schemes in some way might help. I’d be happy to answer more questions if you decide to go down this path and need help.
Hope this was useful information.