luzhao / coverstory

Automatically exported from code.google.com/p/coverstory
Apache License 2.0
0 stars 0 forks source link

I got source file cannot open when open .gcda file with cover story #51

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. I use xcode4.6.3 and llvm4.2 to generate gcno and gcda file
2. I open the gcda file with cover story
3.

What is the expected output? What do you see instead?
I can see that 
Successfully loaded 5 coverage fragments.
Full dataset executed 74.1% of 27 lines (20 executed, 27 executable, 1725 
total lines).
There is a tooltip on the total above the file list that shows numbers for 
the currently displayed set.

Also with error:
xxxx/Classes/Controller/OrderConfirmView.m:cannot open source file
xxxxx/Classes/Controller/OrderConfirmView.h:cannot open source file

What version of the product are you using? On what operating system?
I'm using 4.4.1 and mac 10.8.4

Please provide any additional information below.

Original issue reported on code.google.com by greenzon...@gmail.com on 29 Sep 2013 at 9:59

GoogleCodeExporter commented 9 years ago
Is the path to the source file that you are trying to open correct?

Original comment by dmaclach on 29 Sep 2013 at 3:15

GoogleCodeExporter commented 9 years ago
yes,I realized that the path is not full, which means the path is not start 
from root("/"), it's just middle part of the full path. But I don't know how 
this happened

Original comment by greenzon...@gmail.com on 30 Sep 2013 at 7:24

GoogleCodeExporter commented 9 years ago
How is it in your project? What is it relative to?

Original comment by dmaclach on 1 Oct 2013 at 2:32

GoogleCodeExporter commented 9 years ago
This the full path of one of the files in my project:
/Users/Shawn/Dev/trunk/iphone/ProjectName/Classes/Controller/OrderConfirmView.m

Cover story read the relative path of this file:
/ProjectName/Classes/Controller/OrderConfirmView.m

That's why it could not open the source file.Is that LLVM compiler issue?(I'm 
using llvm 4.2) What I can't understand is some files are open successfully by 
cover story, but rest of them showed can not open source file 
error.However,for those failed open file,code coverage rate is calculated 
already with only "/*EOF*/" shown in code area.

Original comment by greenzon...@gmail.com on 2 Oct 2013 at 7:08

GoogleCodeExporter commented 9 years ago
The key issue is how that file is stored in your project. Is it relative to the 
project or what?

Original comment by dmaclach on 2 Oct 2013 at 11:17

GoogleCodeExporter commented 9 years ago
My gcda and gcno files are located in 
:/Users/Shawn/Library/Developer/Xcode/DerivedData/ProjectName-gfuobhogueenypdean
kkywdrlxcw/Build/Intermediates/ProjectName.build/Debug-iphonesimulator/ProjectNa
me.build/Objects-normal/i386 

Original comment by greenzon...@gmail.com on 3 Oct 2013 at 6:07

GoogleCodeExporter commented 9 years ago
it happen to my project also. I tried re-create test project ,delete the source 
file re-add to project , delete the class re-create the class , but coverstory 
still report cannot open the source file. while another source in seem 
directory is ok.

Original comment by gagehu...@gmail.com on 9 Dec 2013 at 1:19

GoogleCodeExporter commented 9 years ago
i find it depends on the content of the source . when i rem most code of in 
source file .m , coverstory could open source and display cover ratio properly. 
while some codes (like dispatchasync...) makes it wrong.

Original comment by gagehu...@gmail.com on 9 Dec 2013 at 9:49

GoogleCodeExporter commented 9 years ago
finally , all my code with block , might result in source file can't open by 
coverstory.

Original comment by gagehu...@gmail.com on 10 Dec 2013 at 6:55