SlatherOrg / slather

Generate test coverage reports for Xcode projects & hook it into CI.
MIT License
1.56k stars 237 forks source link

slather error find_binary_files #213

Open croccio opened 8 years ago

croccio commented 8 years ago

https://github.com/Backelite/sonar-swift/issues/27#issuecomment-220995086

can someone help me please?

-n Computing coverage report -n . /Library/Ruby/Gems/2.0.0/gems/slather-2.2.0/lib/slather/project.rb:445:in find_binary_files': No product binary found in /Users/antonio/Library/Developer/Xcode/DerivedData/Qui-bytbtjdboajwjvdreycwlxvvniqo/Build/Intermediates/CodeCoverage. (StandardError) from /Library/Ruby/Gems/2.0.0/gems/slather-2.2.0/lib/slather/project.rb:337:inconfigure_binary_file' from /Library/Ruby/Gems/2.0.0/gems/slather-2.2.0/lib/slather/project.rb:240:in configure' from /Library/Ruby/Gems/2.0.0/gems/slather-2.2.0/lib/slather/command/coverage_command.rb:48:inexecute' from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in run' from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11:inexecute' from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in run' from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:inrun' from /Library/Ruby/Gems/2.0.0/gems/slather-2.2.0/bin/slather:15:in <top (required)>' from /usr/local/bin/slather:23:inload' from /usr/local/bin/slather:23:in `

' ERROR - Command 'slather coverage --input-format profdata -i .Tests. --cobertura-xml --output-directory sonar-reports --workspace Qui.xcworkspace --scheme QUI! Collaudo Esterno Qui.xcodeproj' failed with error code: 1

neonichu commented 8 years ago

Are there any binaries in the given path /Users/antonio/Library/Developer/Xcode/DerivedData/Qui-bytbtjdboajwjvdreycwlxvvniqo/Build/Intermediates/CodeCoverage?

Could be that the exclamation mark in your scheme name breaks slather right now.

croccio commented 8 years ago

no, there isn't

Il giorno 24 mag 2016, alle ore 04:58, Boris Bügling notifications@github.com ha scritto:

Are there any binaries in the given path /Users/antonio/Library/Developer/Xcode/DerivedData/Qui-bytbtjdboajwjvdreycwlxvvniqo/Build/Intermediates/CodeCoverage?

Could be that the exclamation mark in your scheme name breaks slather right now.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/SlatherOrg/slather/issues/213#issuecomment-221153945

croccio commented 8 years ago

i've deleted exclamation mark i get same error

croccio commented 8 years ago

-n Computing coverage report -n . /Library/Ruby/Gems/2.0.0/gems/slather-2.2.0/lib/slather/project.rb:445:in find_binary_files': No product binary found in /Users/antonio/Library/Developer/Xcode/DerivedData/Qui-bytbtjdboajwjvdreycwlxvvniqo/Build/Intermediates/CodeCoverage. (StandardError) from /Library/Ruby/Gems/2.0.0/gems/slather-2.2.0/lib/slather/project.rb:337:inconfigure_binary_file' from /Library/Ruby/Gems/2.0.0/gems/slather-2.2.0/lib/slather/project.rb:240:in configure' from /Library/Ruby/Gems/2.0.0/gems/slather-2.2.0/lib/slather/command/coverage_command.rb:48:inexecute' from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in run' from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.5/lib/clamp/subcommand/execution.rb:11:inexecute' from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.5/lib/clamp/command.rb:67:in run' from /Library/Ruby/Gems/2.0.0/gems/clamp-0.6.5/lib/clamp/command.rb:132:inrun' from /Library/Ruby/Gems/2.0.0/gems/slather-2.2.0/bin/slather:15:in <top (required)>' from /usr/local/bin/slather:23:inload' from /usr/local/bin/slather:23:in `

' ERROR - Command 'slather coverage --input-format profdata -i .Tests. --cobertura-xml --output-directory sonar-reports --workspace Qui.xcworkspace --scheme Qui Collaudo Esterno Qui.xcodeproj' failed with error code: 1

here you are. it's the same

neonichu commented 8 years ago

What's the actual name of your scheme? What's the output of xcodebuild -list -project Collaudo Eastern Qui.xcodeproj?

croccio commented 8 years ago

if i run this i get error

xcodebuild -list -project "Qui Collaudo Esterno" Qui.xcodeproj

[...]
xcodebuild: error: Unknown build action 'Qui.xcodeproj'

if i run this i get

xcodebuild -list -project Qui.xcodeproj

[...]
Information about project "Qui":
Targets:
    QUI
    QuiTests
    QuiUITests

Build Configurations:
    Debug
    Collaudo Esterno
    Release

If no build configuration is specified and -scheme is not passed then "Release" is used.

Schemes:
    Qui
    Qui Produzione
    Qui Collaudo Esterno
neonichu commented 8 years ago

Oh, I see the issue now, your scheme name contains spaces. Can you try passing --scheme 'Qui Collaudo Esterno' to slather instead?

croccio commented 8 years ago

no, the same. i've tried to delete space from scheme name too, but i get error

croccio commented 8 years ago

if i run slather as sudo it stuck for ever

croccio commented 8 years ago

i've xcode 7.3

croccio commented 8 years ago

@neonichu if i remove --scheme than it works. maybe with Xcode 7.3 the path is changed?

vinnybad commented 8 years ago

I'm seeing the same issue. Were you able to resolve this @croccio ?

sebromero commented 8 years ago

@croccio Spaces in schemes shouldn't be an issue. When adding a space to the test fixture's scheme the tests still pass. Make sure you run the tests before invoking slather. As @neonichu pointed out, try to locate the binary file in the project's derived data directory. Once you found it, try to run slather with --binary-file "/path/to/binary" and see what happens.

devashree-shukla commented 4 years ago

@croccio Spaces in schemes shouldn't be an issue. When adding a space to the test fixture's scheme the tests still pass. Make sure you run the tests before invoking slather. As @neonichu pointed out, try to locate the binary file in the project's derived data directory. Once you found it, try to run slather with --binary-file "/path/to/binary" and see what happens.

Can you explain further what this means ? I am getting the same error in Xcode 11.3

thejeswara commented 4 years ago

@ShuklaDevashree963 Did you found any solution for this? I am also facing same issue in Xcode 11.3.

nurirppan commented 1 year ago

did you found any solution brother ? i am using xcode 14.2 @croccio