From eb18b8c0deaaf90a7a9cf807693782cdafc801c1 Mon Sep 17 00:00:00 2001 From: vkargov Date: Mon, 22 May 2017 05:43:28 -0700 Subject: [PATCH 1/1] [ci] Add the collect-coverage tag for use on Jenkins. (#4912) * [ci] Add the collect-coverage tag for use on Jenkins. * Move collect-coverage up so we don't set different values for -O --- scripts/ci/run-jenkins.sh | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/ci/run-jenkins.sh b/scripts/ci/run-jenkins.sh index e87ea8838eb..a308f1b252b 100755 --- a/scripts/ci/run-jenkins.sh +++ b/scripts/ci/run-jenkins.sh @@ -5,7 +5,13 @@ export TESTCMD=${MONO_REPO_ROOT}/scripts/ci/run-step.sh export TEST_HARNESS_VERBOSE=1 -if [[ ${label} == w* ]]; then +if [[ $CI_TAGS == *'collect-coverage'* ]]; then + # Collect coverage for further use by lcov and similar tools. + # Coverage must be collected with -O0 and debug information. + export CFLAGS="-ggdb3 --coverage -O0" + # Collect coverage on all optimizations + export MONO_ENV_OPTIONS="$MONO_ENV_OPTIONS -O=all" +elif [[ ${label} == w* ]]; then # Passing -ggdb3 on Cygwin breaks linking against libmonosgen-x.y.dll export CFLAGS="-g -O2" else -- 2.25.1