[netcore] Remove local copy of static alc resolve methods
[mono-project.git] / scripts / ci / collect-coverage.sh
blob0d33f804a13a94bd755e0ce40274f21bec3f8ab6
1 #!/bin/bash -x
3 # This script is meant to be executed on all "slave" machines that run coverage collection.
5 COV_DIR=coverage
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.
14 mkdir "$COV_DIR"
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 -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"