Set up code coverage reports in CI for tracetools and tracetools_test
Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
This commit is contained in:
parent
14776ec7e5
commit
9255c0d723
6 changed files with 40 additions and 0 deletions
|
@ -4,6 +4,10 @@ variables:
|
||||||
BASE_IMAGE_ID: registry.gitlab.com/micro-ros/ros_tracing/ci_base
|
BASE_IMAGE_ID: registry.gitlab.com/micro-ros/ros_tracing/ci_base
|
||||||
DISTRO: foxy
|
DISTRO: foxy
|
||||||
|
|
||||||
|
stages:
|
||||||
|
- build_test
|
||||||
|
- report
|
||||||
|
|
||||||
.global_artifacts: &global_artifacts
|
.global_artifacts: &global_artifacts
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
|
@ -20,6 +24,7 @@ before_script:
|
||||||
- . /root/ws/install/local_setup.sh
|
- . /root/ws/install/local_setup.sh
|
||||||
|
|
||||||
tracing_enabled:
|
tracing_enabled:
|
||||||
|
stage: build_test
|
||||||
image: $BASE_IMAGE_ID:$DISTRO
|
image: $BASE_IMAGE_ID:$DISTRO
|
||||||
script:
|
script:
|
||||||
- lttng --version && apt list lttng-tools liblttng-ust-dev python3-lttng python3-babeltrace
|
- lttng --version && apt list lttng-tools liblttng-ust-dev python3-lttng python3-babeltrace
|
||||||
|
@ -31,6 +36,7 @@ tracing_enabled:
|
||||||
<<: *global_artifacts
|
<<: *global_artifacts
|
||||||
|
|
||||||
tracing_disabled:
|
tracing_disabled:
|
||||||
|
stage: build_test
|
||||||
image: $BASE_IMAGE_ID:$DISTRO
|
image: $BASE_IMAGE_ID:$DISTRO
|
||||||
script:
|
script:
|
||||||
- colcon build --symlink-install --event-handlers console_cohesion+ --cmake-args " -DTRACETOOLS_DISABLED=ON" --packages-up-to $PACKAGES_LIST
|
- colcon build --symlink-install --event-handlers console_cohesion+ --cmake-args " -DTRACETOOLS_DISABLED=ON" --packages-up-to $PACKAGES_LIST
|
||||||
|
@ -40,6 +46,7 @@ tracing_disabled:
|
||||||
<<: *global_artifacts
|
<<: *global_artifacts
|
||||||
|
|
||||||
no_lttng:
|
no_lttng:
|
||||||
|
stage: build_test
|
||||||
image: $BASE_IMAGE_ID:$DISTRO-base
|
image: $BASE_IMAGE_ID:$DISTRO-base
|
||||||
script:
|
script:
|
||||||
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST
|
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST
|
||||||
|
@ -47,3 +54,16 @@ no_lttng:
|
||||||
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
|
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
|
||||||
- colcon test-result --all
|
- colcon test-result --all
|
||||||
<<: *global_artifacts
|
<<: *global_artifacts
|
||||||
|
|
||||||
|
coverage:
|
||||||
|
stage: report
|
||||||
|
image: $BASE_IMAGE_ID:$DISTRO
|
||||||
|
script:
|
||||||
|
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST --mixin coverage-gcc coverage-pytest --cmake-args -DBUILD_TESTING=ON --no-warn-unused-cli -DCMAKE_BUILD_TYPE=Debug
|
||||||
|
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST --mixin coverage-pytest
|
||||||
|
- colcon test-result --all
|
||||||
|
- colcon lcov-result --packages-select tracetools tracetools_test --verbose
|
||||||
|
- coverage combine build/tracetools_test/pytest_cov/*/.coverage
|
||||||
|
- coverage report -m
|
||||||
|
allow_failure: true
|
||||||
|
<<: *global_artifacts
|
||||||
|
|
4
ros2trace/.coveragerc
Normal file
4
ros2trace/.coveragerc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[run]
|
||||||
|
omit =
|
||||||
|
setup.py
|
||||||
|
test/*
|
4
tracetools_launch/.coveragerc
Normal file
4
tracetools_launch/.coveragerc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[run]
|
||||||
|
omit =
|
||||||
|
setup.py
|
||||||
|
test/*
|
4
tracetools_read/.coveragerc
Normal file
4
tracetools_read/.coveragerc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[run]
|
||||||
|
omit =
|
||||||
|
setup.py
|
||||||
|
test/*
|
4
tracetools_test/.coveragerc
Normal file
4
tracetools_test/.coveragerc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[run]
|
||||||
|
omit =
|
||||||
|
setup.py
|
||||||
|
test/*
|
4
tracetools_trace/.coveragerc
Normal file
4
tracetools_trace/.coveragerc
Normal file
|
@ -0,0 +1,4 @@
|
||||||
|
[run]
|
||||||
|
omit =
|
||||||
|
setup.py
|
||||||
|
test/*
|
Loading…
Add table
Add a link
Reference in a new issue