Code coverage tests

This page documents the degree to which the PARI/GP source code is tested by our public test suite, distributed with the source distribution in directory src/test/. This is measured by the gcov utility; we then process gcov output using the lcov frond-end.

We test a few variants depending on Configure flags on the pari.math.u-bordeaux1.fr machine (x86_64 architecture), and agregate them in the final report:

The target is 90% coverage for all mathematical modules (given that branches depending on DEBUGLEVEL or DEBUGMEM are not covered). This script is run to produce the results below.

LCOV - code coverage report
Current view: top level - gp - gp.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 17110-9967e23) Lines: 199 342 58.2 %
Date: 2014-11-26 Functions: 17 29 58.6 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 79 194 40.7 %

Function Name Sort by function name Hit count Sort by hit count
break_loop 35
dbg_down 0
dbg_err 5
dbg_up 5
free_trivial_stack 0
gp_ask_confirm 0
gp_err_recover 80
gp_head 0
gp_main_loop 948
gp_output 13875
gp_pre_recover 3834
gp_quit 884
init_test 931
init_trivial_stack 0
is_interactive 982
is_silent 20523
main 948
normal_output 0
pari_breakpoint 5
print_shortversion 0
read_arg 0
read_arg_equal 0
read_main 0
read_opt 948
record_default 0
reset_ctrlc 34782
test_is_interactive 40958
test_output 13875
usage 0

Generated by: LCOV version 1.9