ros2_tracing/.gitlab-ci.yml
Christophe Bedard b06e48e08d Use --verbose option with colcon test-result
Backport of 5b5eb99b426733dce969d1b674378cad70e3e960 from !191

Signed-off-by: Christophe Bedard <bedard.christophe@gmail.com>
2020-11-02 16:43:00 -05:00

81 lines
2.8 KiB
YAML

variables:
DOCKER_DRIVER: overlay2
PACKAGES_LIST: ros2trace tracetools tracetools_launch tracetools_read tracetools_test tracetools_trace
BASE_IMAGE_ID: registry.gitlab.com/ros-tracing/ci_base
DISTRO: foxy
stages:
- build_test
- report
.global_artifacts: &global_artifacts
artifacts:
paths:
- install
- build/*/test_results/*/*.xunit.xml
- build/*/pytest.xml
reports:
junit:
- build/*/test_results/*/*.xunit.xml
- build/*/pytest.xml
before_script:
- vcs import < instrumented.repos
- . /root/ws/install/local_setup.sh
tracing_enabled:
stage: build_test
image: $BASE_IMAGE_ID:$DISTRO
script:
- lttng --version && apt list lttng-tools liblttng-ust-dev python3-lttng python3-babeltrace
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST
- . install/setup.sh
- ./build/tracetools/status
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
- colcon test-result --all --verbose
<<: *global_artifacts
tracing_disabled:
stage: build_test
image: $BASE_IMAGE_ID:$DISTRO
script:
- colcon build --symlink-install --event-handlers console_cohesion+ --cmake-args " -DTRACETOOLS_DISABLED=ON" --packages-up-to $PACKAGES_LIST
- (! ./build/tracetools/status)
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
- colcon test-result --all --verbose
<<: *global_artifacts
no_lttng:
stage: build_test
image: $BASE_IMAGE_ID:$DISTRO-base
script:
- colcon build --symlink-install --event-handlers console_cohesion+ --packages-up-to $PACKAGES_LIST
- . install/setup.sh
- (! ./build/tracetools/status)
- (! ros2 trace)
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST
- colcon test-result --all --verbose
<<: *global_artifacts
coverage:
stage: report
image: $BASE_IMAGE_ID:$DISTRO
script:
- pip3 install -U codecov
- 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
- colcon lcov-result --initial
- colcon test --event-handlers console_cohesion+ --packages-select $PACKAGES_LIST --mixin coverage-pytest
- colcon test-result --all --verbose
- colcon lcov-result --packages-select tracetools tracetools_test --filter **/tracetools_test/test/* --verbose
- colcon coveragepy-result --packages-select $PACKAGES_LIST --verbose --coverage-report-args -m
- codecov -X gcovout --file lcov/total_coverage.info coveragepy/.coverage
allow_failure: true
<<: *global_artifacts
trigger_gen_docs:
stage: report
only:
refs:
- master
- foxy
trigger: ros-tracing/ros2_tracing-api