summaryrefslogtreecommitdiffstats
path: root/user/testing/coverage.rst
blob: 4f2266ef482222df52fc1ba126d012ef188246c0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
.. SPDX-License-Identifier: CC-BY-SA-4.0

.. Copyright (C) 2019 Vijay Kumar Banerjee <vijaykumar9597@gmail.com>

Coverage Analysis
=================

RTEMS is used in many critical systems. It is important that the RTEMS Project
ensure that the RTEMS product is tested as thoroughly as possible. With this
goal in mind, the RTEMS test suite was expanded with the goal that 100% of the
RTEMS executive is tested.

RTEMS-TESTER takes the following arguments to produce coverage reports:

`--coverage :`
    When the coverage option is enabled the tester produces coverage reports for
    all the symbols in cpukit. To generate a coverage report for a specific
    symbol-set ( e.g.: score) the symbol-set is passed as an argument to the
    option, e.g.: --coverage=score.

`--no-clean :`
    Tells the script not to delete the .cov trace files generated while running
    the coverage. These trace files are used for debugging purposes and will not
    be needed for a normal user.

For example: To generate a coverage report of hello.exe for leon3 on SIS, the
following command is used:

.. code-block:: none

    rtems-test \
    --rtems-tools=$HOME/development/rtems/5 \
    --log=coverage_analysis.log \
    --no-clean \
    --coverage \
    --rtems-bsp=leon3-sis-cov \
    $HOME/development/rtems/kernel/leon3/sparc-rtems5/c/leon3/testsuites/samples/hello.exe

The command will create the coverage report in the following tree structure:

.. code-block:: none

    ├── coverage_analysis.log
    ├── leon3-sis-coverage
    │   └── score
    │       ├── annotated.html
    │       ├── annotated.txt
    │       ├── branch.html
    │       ├── branch.txt
    │       ├── covoar.css
    │       ├── ExplanationsNotFound.txt
    │       ├── index.html
    │       ├── no_range_uncovered.html
    │       ├── no_range_uncovered.txt
    │       ├── NotReferenced.html
    │       ├── sizes.html
    │       ├── sizes.txt
    │       ├── summary.txt
    │       ├── symbolSummary.html
    │       ├── symbolSummary.txt
    │       ├── table.js
    │       ├── uncovered.html
    │       └── uncovered.txt
    └── leon3-sis-report.html

The html on top of the directory, i.e., leon3-sis-report.html is the top level
navigation for the coverage analysis report and will let the user browse through
all the generated reports from different subsystems.