User Tools

Site Tools


developers:coverage

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
developers:coverage [2018/02/12 20:48] – created Jean-Michel Beukendevelopers:coverage [2020/08/09 10:28] (current) – [How to trigger a coverage report ?] Jean-Michel Beuken
Line 3: Line 3:
 ===== Motivations ===== ===== Motivations =====
  
-In computer science, code coverage is a measure used to describe the degree to which the source code of a program is tested by a particular test suite. A program with high code coverage has been more thoroughly tested and has a lower chance of containing software bugs than a program with low code coverage. Many different metrics can be used to calculate code coverage; some of the most basic are the percent of program subroutines and the percent of program statements called during execution of the test suite.[1]+In computer science, code coverage is a measure used to describe the degree to which the source code of a program is tested by a particular test suite. A program with high code coverage has been more thoroughly tested and has a lower chance of containing software bugs than a program with low code coverage. Many different metrics can be used to calculate code coverage; some of the most basic are the percent of program subroutines and the percent of program statements called during execution of the test suite.[ [[developers:coverage#cov|1]] ]
  
 We aim that the test suite covers all the functionalities of ABINIT. We aim that the test suite covers all the functionalities of ABINIT.
Line 12: Line 12:
 ABINIT is built with special options such that every function that is exercised (executed) in the program(s) is mapped back to the function points in the source code. ABINIT is built with special options such that every function that is exercised (executed) in the program(s) is mapped back to the function points in the source code.
  
-A .gcno file is generated when the source file is compiled with the GCC //-ftest-coverage// option. It contains information to reconstruct the basic block graphs and assign source line numbers to blocks.[2]+A .gcno file is generated when the source file is compiled with the GCC //-ftest-coverage// option. It contains information to reconstruct the basic block graphs and assign source line numbers to blocks.[ [[developers:coverage#cov|2]] ]
  
-A .gcda file is generated when a program containing object files built with the GCC //-fprofile-arcs// option is executed. A separate .gcda file is created for each object file compiled with this option. It contains arc transition counts, and some summary information[2].+A .gcda file is generated when a program containing object files built with the GCC //-fprofile-arcs// option is executed. A separate .gcda file is created for each object file compiled with this option. It contains arc transition counts, and some summary information[ [[developers:coverage#cov|2]] ].
  
 We use lcov to analyze the .gcda files for generating a html report  ([[http://ltp.sourceforge.net/coverage/lcov.php]]) We use lcov to analyze the .gcda files for generating a html report  ([[http://ltp.sourceforge.net/coverage/lcov.php]])
Line 20: Line 20:
 ===== How to trigger a coverage report ? ===== ===== How to trigger a coverage report ? =====
  
-There is one slave dedicated to "on-demand" execution of branches by the developers, that produces a code coverage report, at present, tikal_gcc49_cov. It can be launched by the general "[[https://bbportal.abinit.org/#/ondemand|on-demand]]" interface (contact Jean-Michel or Xavier if you do not yet have access to it).+There is one slave dedicated to "on-demand" execution of branches by the developers, that produces a code coverage report, at present, higgs_gnu_7.5_cov. It can be launched by the general "[[https://bbportal.abinit.org|on-demand]]" interface (see [[bb:misc|Use of buildbot for ABINIT]], contact Jean-Michel or Xavier if you do not yet have access to it).
 Code coverage reports from recent runs of the tests are available [[http://coverage.abinit.org/|here]] Code coverage reports from recent runs of the tests are available [[http://coverage.abinit.org/|here]]
-If you see parts of the code which are not well tested, please contribute to improving coverage by writing new tests ! +If you see parts of the code which are not well tested, please contribute to improving coverage by writing new tests ! \\
 ---- ----
-References +References \\ 
-[1] [[http://en.wikipedia.org/wiki/Code_coverage|Wikipedia]] +[[developers:coverage#cov|1]] ] [[http://en.wikipedia.org/wiki/Code_coverage]] \\ 
-[2] [[http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/index.html#toc_Gcov|gcc.gnu.org]]+[[developers:coverage#gcov|2]] ] [[http://gcc.gnu.org/onlinedocs/gcc-4.2.4/gcc/index.html#toc_Gcov]]
  
developers/coverage.1518464906.txt.gz · Last modified: 2018/02/12 20:48 by Jean-Michel Beuken