3 # This script is meant to be executed on all "slave" machines that run coverage collection.
6 COV_NAME="$(echo $JOB_NAME | sed 's#/#-#g').info"
7 COV_INFO="$COV_DIR/$COV_NAME"
9 # Build Mono and collect coverage on the test suite.
10 CI_TAGS="collect-coverage,monolite,$CI_TAGS" scripts/ci/run-jenkins.sh
12 # Place the coverage info file into the coverage directory.
13 # Multiple such files can be assembled to create a unified coverage report that spans multiple architectures and operating systems.
15 scripts/ci/run-step.sh --label=coverage-lcov --timeout=20m lcov --no-external -c -d mono -d support -d tools -o "$COV_INFO"
17 # Generate HTML coverage report in the lcov directory at the root of the project.
18 scripts/ci/run-step.sh --label=coverage-genhtml --timeout=20m genhtml -f -s "$COV_INFO" -o lcov
20 # Make the paths relative so that they could be assembled from different Jenkins workspaces.
21 sed -Eie "s#^SF:$WORKSPACE/?#SF:#" "$COV_INFO"