Results 1 to 2 of 2
Ok heretics, WindowsDude has another question for you !
I have this treacherous program in C which uses external static libraries (extern etc), and want to do a coverage test ...
- 06-01-2010 #1
Coverage testing with gcov
Ok heretics, WindowsDude has another question for you !
I have this treacherous program in C which uses external static libraries (extern etc), and want to do a coverage test of it. The libraries are written in fortran.
I compile like this
I run my nice program like thatCode:gcc -fprofile-arcs -ftest-coverage -o main main.c library.o
Then I do the magic stuffCode:./main
Code:gcov main.c library.f
Ok 98% of the lines were used in main.c, and I get a file with line counts and all that. Great! But, I need to know the coverage in my library too! It says 0.0% and that's impossible. So what can I do?
I can't run it like an executable because it's a library.
And why is the terminal not accepting my copy paste? I copy some lines from my IDE, then I want to paste it into the terminal (with ctrl-v of course, not some crazy local application non-standard counter-intuitive key combo made just to cause agony among honest users!), and that could've been the only problem here, but it isn't. I can't even paste with that right click menu. So, if I was crazy before, I went nuts after that. My great "solution" was to paste it into the firefox URL field (not the search field ) and then copy that and paste it into the terminal. Is that common practice for you all while dealing with that unburied DOS-window?
- 06-02-2010 #2
Ok, so I tested this on another computer and it worked. Same reliability as on Windows 95!


Reply With Quote