Attention une mise à jour du serveur va être effectuée le vendredi 16 avril entre 12h et 12h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit b0ef499e authored by BRAMAS Berenger's avatar BRAMAS Berenger

Merge branch 'add-coverage' into 'master'

First attempt to add coverage for the unit tests and publish results on gitlab

See merge request bramas/spetabaru!5
parents 7b9c7c92 791a3406
......@@ -6,7 +6,7 @@ spetabaru:
- cd build
- VERBOSE=1 CXX=g++-7 cmake ..
- make
- make test
- CTEST_OUTPUT_ON_FAILURE=TRUE make test
spetabaru-debug:
......@@ -15,5 +15,33 @@ spetabaru-debug:
- cd build
- VERBOSE=1 CXX=g++-7 cmake -DCMAKE_BUILD_TYPE=DEBUG ..
- make
- make test
- CTEST_OUTPUT_ON_FAILURE=TRUE make test
spetabaru-debug-coverage:
script:
- mkdir build
- cd build
- VERBOSE=1 CXX=g++-7 cmake -DCMAKE_BUILD_TYPE=DEBUG -DSPETABARU_USE_COVERAGE=ON ..
- make
- CTEST_OUTPUT_ON_FAILURE=TRUE make test
- lcov --directory ./ -c -o coverage-rapport.info
- lcov --list coverage-rapport.info
- genhtml -o ../coverage -t "Coverage example" coverage-rapport.info
artifacts:
paths:
- coverage/
pages:
stage: deploy
dependencies:
- spetabaru-debug-coverage
script:
- mv coverage/ public/
artifacts:
paths:
- public
expire_in: 30 days
only:
- master
......@@ -88,6 +88,17 @@ set(SPETABARU_VERSION "${SPETABARU_MAJOR_VERSION}.${SPETABARU_MINOR_VERSION}.${
# Options
#===========================================================================
option(SPETABARU_USE_COVERAGE "Should be ON to enable code coverage" OFF)
if( SPETABARU_USE_COVERAGE )
message(STATUS "Main -- Use code coverage")
set(SPETABARU_CXX_FLAGS "${SPETABARU_CXX_FLAGS} -g -O0 --coverage")
list(APPEND SPETABARU_LIBRARIES gcov)
# Then one can use these commande:
# lcov --directory CMakeFiles/ -c -o coverage-rapport.info
# genhtml -o ./coverage -t "Coverage example" coverage-rapport.info
endif()
# Extra-flags
SET( SPETABARU_EXTRA_CXX_FLAGS "-funroll-loops" CACHE STRING "These flags are used for all configurations" )
set(SPETABARU_CXX_FLAGS "-std=c++17 ${SPETABARU_CXX_FLAGS} ${SPETABARU_EXTRA_CXX_FLAGS}")
......
[![pipeline status](https://gitlab.inria.fr/bramas/spetabaru/badges/master/pipeline.svg)](https://gitlab.inria.fr/bramas/spetabaru/commits/master)
[![coverage report](https://gitlab.inria.fr/bramas/spetabaru/badges/master/coverage.svg)](https://gitlab.inria.fr/bramas/spetabaru/commits/master)
# Introduction
SPETABARU is a task-based runtime system, which is
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment