Hi Nikolay, On Mon, Dec 28, 2015 at 2:37 AM, Nikolay Aleksandrovich Pavlov <[email protected]> wrote: > > 2015-12-28 6:45 GMT+03:00 Yegappan Lakshmanan <[email protected]>: >> >> Hi all, >> >> Just in case anyone is looking for getting the code coverage information >> for Vim, I used the following steps to get this. >> >> 1. Modify src/Makefile and add the following two lines: >> >> CFLAGS=-g -O0 -fprofile-arcs -ftest-coverage >> LDFLAGS=--coverage >> >> 2. Run configure and build Vim as usual. >> 3. Run "make test" to run the unit tests. >> 4. The code coverage information will be generated in the src/objects >> directory. >> 5. Use the following command to get the code coverage information for a >> particular source file: >> >> $ cd src >> $ gcov -o objects <filename.c> >> >> The code coverage information will be in the <filename.c>.gcov file. > > One does not need to go that far: https://coveralls.io/github/vim/vim. >
Thanks for the link. I was not aware of this site. IIUC, this site is useful only for getting the coverage information for the committed/published code. When developing new tests or modifying existing tests, the manual steps are needed to get the coverage information. > > Also AFAIK Makefile is normally receiving CFLAGS and LDFLAGS from > environment, so > first point is incorrect. At least, it definitely does this with CFLAGS. > Are you suggesting that the CFLAGS and LDFLAGS can be passed to the build without modifying the src/Makefile? It may work. But for other flags, the Makefile contains instructions to modify the CFLAGS and LDFLAGS in the Makefile itself. > > Also note that Vim does not have unit tests. `make test` runs functional > tests. > Agreed. Vim has only functional tests. Regards, Yegappan -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
