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