Skip to content

Instantly share code, notes, and snippets.

@kapace
Created December 21, 2010 22:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kapace/750697 to your computer and use it in GitHub Desktop.
Save kapace/750697 to your computer and use it in GitHub Desktop.
Make Cover Documentation

Make Cover

docs/dev/coverage.pod - Make Cover Documentation.

Overview

"make cover" is a very useful tool which generates reports on how well tested parrot code is. The coverage reports are outputted in various formats in cover_db/ after make cover has run. The final result of make cover is a listing of parrot's source files and a matching percentage of how well covered that file is by the tests.

Dependencies

Obviously, the first step would be to get parrot and build it. See docs/intro.pod for more information. To run "make cover" you must first install some Perl tools to aid in the creation of these reports. Make Cover requires the "Devel::Cover" perl module. If you are running Debian/Ubuntu type systems you can run

sudo apt-get install libdevel-cover-perl

or using CPAN:

perl -MCPAN -e 'install Devel::Cover'

and that will install the required module. Other OSes may have this packaged as well, so try to find it. If you do not have a packaged version of this module, head over to http://search.cpan.org/dist/Devel-Cover/ and install it.

Process

Next, make sure your working parrot directory is as clean as can be. Any left over files can cause problems when generating the coverage reports.

make realclean
  

or

git clean -dfx

Next, run make test to see if there are any failing tests. Finally you can type in make cover and leave to make a sandwich and something to drink because its probably going to take a long time to run. If you run into trouble, make fulltest may be of some assistance.

Quickcover

If you have run make cover before, you know how long it takes to execute that command. Recently a new tool make quickcover has been added that is much faster, but does not run tests in all runcores.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment