Skip to content
Snippets Groups Projects
Commit c0ecbb07 authored by Stefan Schmidt's avatar Stefan Schmidt
Browse files

Start on Coverage


make && make test
gcovr -s -f ../communications* -r ../ .

Signed-off-by: default avatarStefan Schmidt <stefan.schmidt@huawei.com>
parent 3dab4057
No related branches found
No related tags found
No related merge requests found
Pipeline #4539 failed
......@@ -24,7 +24,20 @@ build:
test:
stage: test
image: stefanschmidt1/eddie-docker:latest
variables:
CFLAGS: "--coverage"
CXXFLAGS: "--coverage"
LDFLAGS: "--coverage"
script:
- mkdir build && cd build
- cmake .. && make
- make test
- gcovr --xml-pretty --exclude-unreachable-branches --print-summary -o coverage.xml --root ${CI_PROJECT_DIR}
coverage: /^\s*lines:\s*\d+.\d+\%/
artifacts:
name: ${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHA}
expire_in: 2 days
reports:
coverage_report:
coverage_format: cobertura
path: build/coverage.xml
......@@ -19,6 +19,10 @@ if(CMAKE_BUILD_TYPE STREQUAL "DEBUG")
add_compile_definitions(DEBUG)
endif()
#SET(CMAKE_CXX_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
#SET(CMAKE_C_FLAGS "-g -O0 -fprofile-arcs -ftest-coverage")
#SET(CMAKE_EXE_LINKER_FLAGS "-fprofile-arcs -ftest-coverage")
add_subdirectory(communication)
add_subdirectory(tests)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment