wiki:GSoC/2018/coverage_analysis_toolset

Version 4 (modified by Vijay Kumar Banerjee, on Jun 22, 2018 at 8:40:58 PM) (diff)

--

Improve Coverage Analysis Toolset

Table of Contents

    Error: Page PAGE_LOCATION does not exist

Mentors: Chris Johns, Joel Sherrill, C.P. O'Donnell

Students: Vijay Kumar Banerjee

Progress: The Coverage Analysis is running and generating coverage reports in html and txt format

Blockers: Generating .gcno notes files by changing gcc flags

Development Blog : https://thelunatic.github.io/rtems_gsoc18

Introduction

This project is to improve the tools used to perform the analysis and generate reports. It will convert all the config files to .ini and get the coverage analysis running properly. Then the coverage tools will be integrated with RTEMS Tester . Also gcov reports will be generated and the report generation of the covoar tool will be reworked to give output it some data-centric format.

Project

prerequisites

  • Covoar and rtemstoolkit (C++)
  • RTEMS Tester framework (Python)
  • Understand INI format for config files.
  • Reports (HTML and text currently, add XML)

Running covoar To generate coverage reports

To run covoar we need to run covoar from the RTEMS-KERNEL BUILD directory.

NOTE : The .cov trace files are needed to get coverage reports

covoar -S /home/lunatic/development/rtems/test/rtems-tools/tester/rtems/testing/coverage/leon3-qemu-symbols.ini \
-O coverage/score -E/home/lunatic/development/rtems/test/rtems-tools/tester/rtems/testing/coverage/Explanations.txt \
-p RTEMS-5 sparc-rtems5/c/leon3/testsuites/samples/hello.exe -g /home/lunatic/gcnolist

covoar usage :

Usage: covoar [-v] -T TARGET -f FORMAT [-E EXPLANATIONS] -e EXE_EXTENSION -c COVERAGEFILE_EXTENSION EXECUTABLE1 ... EXECUTABLE2

  -v                        - verbose at initialization
  -T TARGET                 - target name
  -f FORMAT                 - coverage file format (RTEMS, QEMU, TSIM or Skyeye)
  -E EXPLANATIONS           - name of file with explanations
  -s SYMBOL_SET_FILE        - path to the INI format symbol sets
  -1 EXECUTABLE             - name of executable to get symbols from
  -e EXE_EXTENSION          - extension of the executables to analyze
  -c COVERAGEFILE_EXTENSION - extension of the coverage files to analyze
  -g GCNOS_LIST             - name of file with list of *.gcno files
  -p PROJECT_NAME           - name of the project
  -C ConfigurationFileName  - name of configuration file
  -O Output_Directory       - name of output directory (default=.
  -d debug                  - disable cleaning of tempfile

Running RTEMS-TESTER for Coverage analysis

RTEMS-TESTER when run with --coverage option, generates an html coverage analysis report (report.html)

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

NOTE : The --no-clean option tells the script not to delete the .cov trace files generated while running the coverage. These Trace files can be used for running covoar directly.

Please visit my development blog to see examples of coverage report

Resources

TBA

References

  • TBD