xcode-coveralls icon indicating copy to clipboard operation
xcode-coveralls copied to clipboard

fail to publish report to coveralls on jenkins build machine which uses xcode7

Open helenren opened this issue 9 years ago • 5 comments

Hit follow error: hit Error: No .gcno files in build directory: /Users/iosadmin/03b72f19/workspace/xcode-coveralls/myDerivedData

The command I run is on jenkins after running my test via xcodebuild:

xcode-coveralls --verbose --service jenkins --token --project $WORKSPACE/libs/SalesforceAnalytics --id $BUILD_NUMBER ${WORKSPACE}/myDerivedData

after test, my code only generate coverage.profdata and .xccoverage code coverage file. There is no .gcno file. Can this tool work with new code coverage formate? And how?

helenren avatar Dec 22 '16 09:12 helenren

Not yet.
For now you'll also need to generate the «old» code coverage format, using the following settings in the Xcode build settings:

  • Generate Test Coverage Files (GCC_GENERATE_TEST_COVERAGE_FILES)
  • Instrument Program Flow (GCC_INSTRUMENT_PROGRAM_FLOW_ARCS)

macmade avatar Dec 22 '16 11:12 macmade

After to make my project to generate old code coverage format, .gcno files are generated. Thanks.

While hit another error when running: xcode-coveralls --verbose --service jenkins --token --project $WORKSPACE/libs/SalesforceAnalytics --id $BUILD_NUMBER "${WORKSPACE}/myDerivedData/Build/Intermediates/SalesforceAnalytics.build/Debug-iphonesimulator/SalesforceAnalytics.build/Objects-normal/x86_64":

Error: There was a problem communicating with the secure web proxy server (HTTPS).

Since our jenkins build machine locates inside a firewall, so I setup http_proxy/https_proxy ahead. Is that cause the problem? How to make it work with using proxy server? Thanks!

helenren avatar Dec 22 '16 22:12 helenren

For more information, after running that xcode-coeralls command, here is the partial logs. Is looks correct, or something is wrong? On coveralls.io server side, nothing post there.

GIT error (-1): unable to retrieve the branch name 13:35:20 - Reference 'HEAD' is neither a local nor a remote branch. 13:35:20 { 13:35:20 "git" : { 13:35:20 "head" : { 13:35:20 "author_name" : "Qingchun Ren", 13:35:20 "id" : "a5215ee49f30393728a73a47798b3a2293a3d83f", 13:35:20 "committer_name" : "Qingchun Ren", 13:35:20 "committer_email" : "[email protected]", 13:35:20 "author_email" : "[email protected]", 13:35:20 "message" : "disable analytic and sdkcore to not generte new formate cc data\n" 13:35:20 }, 13:35:20 "remotes" : [ 13:35:20 { 13:35:20 "name" : "origin", 13:35:20 "url" : "https://github.com/helenren/SalesforceMobileSDK-iOS.git" 13:35:20 } 13:35:20 ] 13:35:20 }, 13:35:20 "repo_token" : "ZMLmqGuydf5sg6XYUZ5kWIkt3viGT9428", 13:35:20 "source_files" : [ 13:35:20 {

helenren avatar Dec 22 '16 22:12 helenren

Not really sure about proxies...

Have you tried with the --verbose flag?
Also, you can try with --dry-run.

macmade avatar Dec 23 '16 13:12 macmade

The logs is from the command with --verbose configured.

And run with --dry-run, that web proxy server error is gone.

helenren avatar Dec 27 '16 20:12 helenren