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 - mt - single.c (source / functions) Hit Total Coverage
Test: PARI/GP v2.8.0 lcov report (development 16741-1378b1c) Lines: 8 16 50.0 %
Date: 2014-08-17 Functions: 5 11 45.5 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 0 -

           Branch data     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                 :       2084 : void mt_err_recover(long er) { (void)er; }
      20                 :        684 : void pari_mt_close(void) { }
      21                 :          0 : void mt_queue_reset(void) { }
      22                 :         32 : void mt_broadcast(GEN code) {(void) code;}
      23                 :            : 
      24                 :            : void
      25                 :          0 : mt_sigint(void) {}
      26                 :            : 
      27                 :            : int
      28                 :     742084 : mt_is_parallel(void)
      29                 :            : {
      30                 :     742084 :   return 0;
      31                 :            : }
      32                 :            : 
      33                 :            : int
      34                 :          0 : mt_is_thread(void)
      35                 :            : {
      36                 :          0 :   return 0;
      37                 :            : }
      38                 :            : 
      39                 :            : void
      40                 :        696 : pari_mt_init(void)
      41                 :            : {
      42                 :        696 :   pari_mt_nbthreads = 1;
      43                 :        696 : }
      44                 :            : 
      45                 :            : void
      46                 :          0 : mt_queue_start(struct pari_mt *pt, GEN worker)
      47                 :            : {
      48                 :          0 :   return mtsingle_queue_start(pt, worker);
      49                 :            : }

Generated by: LCOV version 1.9