SonarOpenCommunity / sonar-cxx

SonarQube C++ Community plugin (cxx plugin): This plugin adds C++ support to SonarQube with the focus on integration of existing C++ tools.
GNU Lesser General Public License v3.0
992 stars 364 forks source link

Sonar Runner not publishing coverage data to SonarQube 4.2.1 #153

Closed David-Jonathan closed 10 years ago

David-Jonathan commented 10 years ago

We recently upgrade from SonarQube 3.6.3 to SonarQube 4.2.1.

We are running Sonar Runner 2.0 to publish gcov reports to SonarQube. Prior to the upgrade the reports were being published properly. After we upgraded to 4.2.1, the reports were not being published.

We are using sonar-cxx-plugin-0.2(community edition) and gcov 3.1 I tried with 0.9 with the corresponding options as well and had the same result. Given below is the sonar-runner.log

Runner configuration file: /x/opt/sonar-runner-2.0/conf/sonar-runner.properties Project configuration file: NONE Runner version: 2.0 Java version: 1.6.0_20, vendor: Sun Microsystems Inc. OS name: "Linux", version: "2.6.18-348.4.1.el5", arch: "amd64" Default locale: "en_US", source code encoding: "ISO-8859-1" (analysis is platform dependent) Other system properties:

04:16:17.568 DEBUG - 232 measures to dump 04:16:18.410 INFO - Store results in database 04:16:18.410 DEBUG - Execute org.sonar.batch.index.ComponentDataPersister 04:16:18.422 DEBUG - Execute org.sonar.batch.issue.IssuePersister 04:16:18.426 DEBUG - Execute org.sonar.batch.phases.GraphPersister 04:16:18.714 INFO - ANALYSIS SUCCESSFUL, you can browse http://sonar.qa.paypal.com/sonar/dashboard/index/CIUT:Money5_CI_build_UT 04:16:18.715 DEBUG - Evict preview database 04:16:18.715 DEBUG - Download: http://sonar.qa.paypal.com/sonar/batch_bootstrap/evict?project=4188121 (no proxy) 04:16:18.779 DEBUG - Post-jobs : org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob@4b2b76b9 -> org.sonar.plugins.core.batch.IndexProjectPostJob@127f923d -> org.sonar.plugins.dbcleaner.ProjectPurgePostJob@7559ec47 -> org.sonar.plugins.buildbreaker.AlertBreaker@62a76581 -> org.sonar.plugins.buildbreaker.ForbiddenConfigurationBreaker@5bf92ac0 04:16:18.779 INFO - Executing post-job class org.sonar.plugins.core.issue.notification.SendIssueNotificationsPostJob 04:16:18.780 INFO - Executing post-job class org.sonar.plugins.core.batch.IndexProjectPostJob 04:16:19.507 INFO - Executing post-job class org.sonar.plugins.dbcleaner.ProjectPurgePostJob 04:16:19.513 DEBUG - Updating semaphore batch-CIUT:Money5_CI_build_UT 04:16:19.521 INFO - -> Keep one snapshot per day between 2014-03-07 and 2014-04-03 04:16:19.522 INFO - -> Keep one snapshot per week between 2013-04-05 and 2014-03-07 04:16:19.522 INFO - -> Keep one snapshot per month between 2009-04-10 and 2013-04-05 04:16:19.523 INFO - -> Delete data prior to: 2009-04-10 04:16:19.523 DEBUG - ooo Using Connection [jdbc:oracle:thin:@xxxxxxxxx:1556:xxxxxxxx, UserName=xxxxxxxx, Oracle JDBC driver] 04:16:19.523 DEBUG - ==> Preparing: select * from projects where id=? 04:16:19.524 DEBUG - ==> Parameters: 4188121(Long) 04:16:19.527 DEBUG - ooo Using Connection [jdbc:oracle:thin:@xxxxxxxxx:1556:xxxxxxxx, UserName=xxxxxxxx, Oracle JDBC driver] 04:16:19.527 DEBUG - ==> Preparing: select * from projects where scope='PRJ' and root_id=? 04:16:19.527 DEBUG - ==> Parameters: 4188121(Long) 04:16:22.906 INFO - -> Clean Money5_CI_build_UT [id=4188121] 04:16:22.913 INFO - <- Clean snapshot 108766043 04:16:25.014 INFO - Executing post-job class org.sonar.plugins.buildbreaker.AlertBreaker 04:16:25.015 INFO - Executing post-job class org.sonar.plugins.buildbreaker.ForbiddenConfigurationBreaker 04:16:25.016 DEBUG - Release semaphore on project : org.sonar.api.resources.Project@5e73e0d[id=4188121,key=CIUT:Money5_CI_build_UT,qualifier=TRK], with key batch-CIUT:Money5_CI_build_UT 04:16:25.057 DEBUG - To prevent a memory leak, the JDBC Driver [oracle.jdbc.OracleDriver] has been forcibly deregistered Total time: 7:41.885s Final Memory: 18M/1962M

Coverage.xml coverage.xml

<?xml version="1.0" ?> <!DOCTYPE coverage SYSTEM 'http://cobertura.sourceforge.net/xml/coverage-03.dtd'>

.

Given below is the sonar-runner invoke command.

/x/opt/sonar-runner-2.0/bin/sonar-runner -X -Dsonar.projectKey=CIUT:Money5_CI_build_UT -Dsonar.projectName=Money5_CI_build_UT -Dsonar.projectVersion=1.0 -Dsonar.sources=/x/hudson/workspace/Money5_CI_build_UT -Dsonar.language=c++ -Dsonar.core.codeCoveragePlugin=cobertura -Dsonar.cxx.valgrind.reportPath=valgrind.xml -Dsonar.cxx.gcovr.reportPath=coverage.xml -Dsonar.cxx.xunit.reportPath='*.junit.xml'

Please revert to us at the earliest as this is critically affecting the metrics.

David-Jonathan commented 10 years ago

Invalid Issue