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-bordeaux.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 - mt - single.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 19350-bd5f220) Lines: 11 17 64.7 %
Date: 2016-08-24 06:11:24 Functions: 6 11 54.5 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* Copyright (C) 2013  The PARI group.
       2             : 
       3             : This file is part of the PARI/GP package.
       4             : 
       5             : PARI/GP is free software; you can redistribute it and/or modify it under the
       6             : terms of the GNU General Public License as published by the Free Software
       7             : Foundation. It is distributed in the hope that it will be useful, but WITHOUT
       8             : ANY WARRANTY WHATSOEVER.
       9             : 
      10             : Check the License for details. You should have received a copy of it, along
      11             : with the package; see the file 'COPYING'. If not, write to the Free Software
      12             : Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */
      13             : #include "pari.h"
      14             : #include "paripriv.h"
      15             : #include "mt.h"
      16             : 
      17           0 : void mt_sigint_block(void) { }
      18           0 : void mt_sigint_unblock(void) { }
      19       14782 : void mt_err_recover(long er) { (void)er; }
      20        1650 : void pari_mt_close(void) { }
      21           0 : void mt_queue_reset(void) { }
      22           6 : void mt_broadcast(GEN code) {(void) code;}
      23             : 
      24             : void
      25           0 : mt_sigint(void) {}
      26             : 
      27             : int
      28     1155820 : mt_is_parallel(void)
      29             : {
      30     1155820 :   return 0;
      31             : }
      32             : 
      33             : int
      34           0 : mt_is_thread(void)
      35             : {
      36           0 :   return 0;
      37             : }
      38             : 
      39             : void
      40        1142 : pari_mt_init(void)
      41             : {
      42        1142 :   pari_mt_nbthreads = 1;
      43        1142 : }
      44             : 
      45             : void
      46      103244 : mt_queue_start(struct pari_mt *pt, GEN worker)
      47             : {
      48      103244 :   mtsingle_queue_start(pt, worker);
      49      103244 : }

Generated by: LCOV version 1.11