From c32ef332d507b784ac5fc7297ecfbfe90004b93d Mon Sep 17 00:00:00 2001 From: Martin Quinson Date: Tue, 28 Feb 2017 03:10:10 +0100 Subject: [PATCH 1/1] another try at having coverage info on travis, for sonar --- sonar-project.properties | 4 ++++ tools/internal/travis-sonarqube.sh | 3 +++ 2 files changed, 7 insertions(+) diff --git a/sonar-project.properties b/sonar-project.properties index c5addf1c89..cbec4f84a9 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -78,6 +78,10 @@ sonar.issue.ignore.allfile.flexMLGenerated.fileRegexp="generated with the FleXML # The build-wrapper output dir sonar.cfamily.build-wrapper-output=bw-outputs +# Where the coverage files are located +# See https://docs.sonarqube.org/pages/viewpage.action?pageId=5312222 +sonar.cfamily.gcov.reportsPath=Testing/CoverageInfo + # Encoding of the source files sonar.sourceEncoding=UTF-8 diff --git a/tools/internal/travis-sonarqube.sh b/tools/internal/travis-sonarqube.sh index 145772eff7..6840e0fa39 100755 --- a/tools/internal/travis-sonarqube.sh +++ b/tools/internal/travis-sonarqube.sh @@ -39,6 +39,9 @@ installBuildWrapper # Run ctest before sonar to gather coverage some information ctest --output-on-failure --timeout 100 +# generate the gcov files +ctest -D ExperimentalCoverage + # and finally execute the actual SonarQube analysis # (the SONAR_TOKEN is set from the travis web interface, to not expose it with an ongoing "set -x") # See https://docs.travis-ci.com/user/sonarqube/ for more info on tokens -- 2.20.1