developers:coverage
Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
developers:coverage [2018/02/12 19:48] – created Jean-Michel Beuken | developers:coverage [2024/09/02 14:25] (current) – Maryam Azizi | ||
---|---|---|---|
Line 1: | Line 1: | ||
+ | <WRAP important> | ||
+ | |||
====== Code Coverage ====== | ====== Code Coverage ====== | ||
===== 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.[ |
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 14: | ||
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 // | + | A .gcno file is generated when the source file is compiled with the GCC // |
- | A .gcda file is generated when a program containing object files built with the GCC // | + | A .gcda file is generated when a program containing object files built with the GCC // |
We use lcov to analyze the .gcda files for generating a html report | We use lcov to analyze the .gcda files for generating a html report | ||
Line 20: | Line 22: | ||
===== How to trigger a coverage report ? ===== | ===== How to trigger a coverage report ? ===== | ||
- | There is one slave dedicated to " | + | There is one slave dedicated to " |
Code coverage reports from recent runs of the tests are available [[http:// | Code coverage reports from recent runs of the tests are available [[http:// | ||
- | 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:// | + | [ [[developers: |
- | [2] [[http:// | + | [ [[developers: |
developers/coverage.1518464906.txt.gz · Last modified: 2018/02/12 19:48 by Jean-Michel Beuken