Changes between Initial Version and Version 1 of CodeCoverageStatistics

Show
Ignore:
Timestamp:
12/10/08 06:43:14 (11 years ago)
Author:
leto
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CodeCoverageStatistics

    v1 v1  
     1A collection of information and links about Parrot's code coverage statistics. 
     2 
     3 * Configuration and build tools test coverage: http://thenceforward.net/parrot/coverage/configure-build/coverage.html 
     4  * At the present time (October 2007 and until further notice), the pages at and under the link above describe the extent to which tests in ''t/configure/'', ''t/postconfigure/'', ''t/tools/pmc2cutils/'', ''t/tools/ops2pmutils/'' and ''t/tools/ops2cutils/'' provide coverage of the code underlying ''Configure.pl'', ''tools/build/pmc2cutils.pl'', ''tools/build/ops2pm.pl'' and ''tools/build/ops2c.pl''. All of these programs are written in Perl 5 and so the focus of these tests is the quality of Perl 5 components of the Parrot project -- not the functionality or quality of Parrot code ''per se''. 
     5 * The approach taken in these tests is to apply the best testing practices developed in the Perl community in the last decade, including: 
     6 
     7  * Test suites written with Test::More and run with Test::Harness utility '''prove'''. 
     8  * Measurement via Devel::Cover of the extent to which the tests exercise code statements. 
     9  * Refactoring of the code to eliminate unreachable code and achieve high test coverage. 
     10 
     11 * While Parrot developers are not required to develop in a "test-driven" manner, they are encouraged to do so and are *strongly* encouraged, when reworking any of the programs or modules covered in these tests, to run the pre- and post-configuration test suites to guarantee that: 
     12  * All tests in those suites continue to pass. 
     13  * There is no diminution in code coverage as a result of ongoing revisions of the programs and packages being tested. 
     14 
     15 * Here are some ways to run the tests: 
     16  * `perl Configure.pl --test`: Runs ''t/configure/'', ''Configure.pl'' itself, ''t/postconfigure/'' and tests in the three ''t/tools/'' directories listed above. 
     17  * `perl Configure.pl --test=configure`: Runs ''t/configure/'' and ''Configure.pl''. 
     18  * `perl Configure.pl --test=build`: Runs ''Configure.pl'', ''t/postconfigure/'' and ''t/tools/''. 
     19  * `make buildtools''tests`: Valid once ''Configure.pl'' has been run, runs tests in the three ''t/tools/'' directories. 
     20  * Here is a shell script to run the tests with coverage analysis: 
     21   
     22{{{ 
     23     COVERAGEDIR=/home/user/parrot/coverage 
     24     SANDBOX=/home/user/work/parrot 
     25     # coverconf: configure-build coverage 
     26     coverconf ()  
     27     { 
     28     cd $SANDBOX && \ 
     29     cover -delete $COVERAGEDIR && \ 
     30     PERL5OPT=-MDevel::Cover=-db,$COVERAGEDIR/ \ 
     31     perl $SANDBOX/Configure.pl --test --configure_trace "$@" && \ 
     32     cover $COVERAGEDIR \ 
     33     -ignore_re 'Configure\.pl' -ignore_re '^t\/' -ignore_re '^\/usr\/local\/bin' \ 
     34     -ignore_re '^lib\/(?!Parrot)' && \ 
     35     chmod 0755 $COVERAGEDIR/ 
     36     } 
     37}}} 
     38  * See also [Perl 5 Components: Test Coverage of Configuration and Build Tools] 
     39  * Note:  Should the coverage statistics not be visible, wait a while, as they may be in the process of being regenerated. 
     40 * C-language code test coverage: 
     41  * http://thenceforward.net/parrot/coverage/c-components/coverage.html 
     42  * The code coverage is generated by running the `make cover` target after configuring Parrot. 
     43  * Last generated on 17-Nov-2007 
     44  * Upload procedure: 
     45 
     46{{{ 
     47     make cover 
     48     cd cover_db 
     49     rm -r runs/ structure/ 
     50     tar -cvzf c_coverage.tar.gz * 
     51     scp c_coverage.tar.gz thenceforward.net:/home/ftp/parrot/coverage/c-components/ 
     52     ssh thenceforward.net 
     53     cd /home/ftp/parrot/coverage/c-components 
     54     rm *.html cover.12 cover.css 
     55     tar -xvzf c_coverage.tar.gz 
     56}}} 
     57                                                                                                                                             
     58