PARI/GP
Main
  Download
  Packages
  Timeline
  Search

Support
  FAQ
  Documentation
  Tutorials
  Ateliers PARI/GP
  Mailing Lists

GP scripts library
  Contributed scripts

Development
  Bugs
  Latest Changes
  Version Control
  Coding Guidelines

Tests & benchmarks
  Buildlogs
  Coverage report
  Benchmarks

Miscellaneous
  WWW Stats
  Logo
  Fun!
  Links

Code coverage tests

[SEE RESULTS] 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:

  • with GMP kernel
  • with native kernel, including micro-assembler code
  • with native kernel, without micro-assembler
  • with native kernel, without micro-assembler, disabling GCC extensions (DISABLE_INLINE)
  • with GMP kernel, emulating an x86_32 architecture at Configure time via setarch

The following script, cov, is run to produce the above results

  • cov --init: configures the various builddirs.
  • cov --test: reset coverage counters and run the tests from make test-all in parallel for all variants, plus the few missing tests (io, env, ...) once.
  • cov: produce the report.

#!/bin/sh
arch=Olinux-x86_64
arch32=Olinux-x86_32
LIST="$arch-gmp.gcov\
 $arch.gcov\
 $arch-none.gcov\
 $arch32-gmp.gcov\
 $arch-noinline.gcov"

main=$arch-gmp.gcov
conf="./Configure -gcov"
case $1 in
  -i|--init)
  $conf --builddir=$arch-gmp.gcov
  $conf --without-gmp --builddir=$arch.gcov
  $conf --kernel=none --builddir=$arch-none.gcov
  env CFLAGS=-DDISABLE_INLINE $conf --kernel=none --builddir=$arch-noinline.gcov
  env CFLAGS=-m32 linux32 $conf --builddir=$arch32-gmp.gcov
  ;;
  -t|--test)
  for d in $LIST; do
    (cd $d && make -j4 gp && make lcov-reset && make statest-all) &
  done
  cd $main && make test-ploth && make test-env && make test-io
  ;;
  *)
  FLAGS=`echo $LIST | sed -e 's/O/-d ..\/O/g'`
  cd $main
  make LCOV_REPORT=/home/www/lcov-report LCOV_FLAGS="$FLAGS" lcov-report
  ;;
esac

PARI/GP Development
Last Modified: 2013-11-02 10:55:07
Copyleft © 2003-2013 the PARI group.