Skip to content
Snippets Groups Projects
Commit 260e377f authored by Dimitrios Stoupis's avatar Dimitrios Stoupis
Browse files

Merge branch 'coverage-reports' into 'master'

Automatic per branch, code coverage report and documentation generation

## Summary
In this request a page deployment job is added to CI settings, which takes care of the automatic, per branch, generation of the code coverage and the doxygen based documentation.

## Implementation details
To generate the code coverage reports, two main additions where needed. First the `set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -g -O0 -Wall --coverage")` compilation flag was added in the `CMakeLists.txt` file, in order to generate the tests with no optimization and also add the necessary coverage - `.gcno` - files. The second addition is the [`gcovr`](http://www.gcovr.com/en/stable/) package, which is a python based package to generate code coverage reports and create the html page.  
In addition to code coverage, in this request the automatic generation of the doxygen documentation is also implemented.  
Once this is merged, there will be one page per branch for the documentation and one for the coverage report. The pages will have the following form:  

**Coverage:** `https://acubesat.gitlab.io/obc/ecss-services/coverage/<branch-name>/`  
**Coverage in master:** `https://acubesat.gitlab.io/obc/ecss-services/coverage/`  
**Documentation:** `https://acubesat.gitlab.io/obc/ecss-services/docs/<branch-name>/`  
**Documentation in master:** `https://acubesat.gitlab.io/obc/ecss-services/docs/`  

## Future improvements and ideas
* The coverage page look can be improved using custom styling, so one goal is to improve the coverage page look.
* Add a welcome page in the root page `https://acubesat.gitlab.io/obc/ecss-services/`

## Update (05/04/2019)
Major improvements have been made since the creation of this merge request. Code coverage is now generated by using two tools, [`gcovr`](http://www.gcovr.com/en/stable/) and [`lcov`](http://ltp.sourceforge.net/coverage/lcov.php). They are used together to compare each other and also generate a better version of the code coverage. Adding to that, the coverage argument hασ been moved from the `CMakefile.txt` to command line arguments like `cmake . -DCMAKE_CXX_FLAGS="-g -O0 --coverage"`.

See merge request acubesat/obc/ecss-services!34
parents a03b685f 684a6825
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment