| Summary: | Sonar code coverage (jacoco) not working for Linux Tools | ||
|---|---|---|---|
| Product: | Community | Reporter: | Marc-André Laperle <malaperle> |
| Component: | Sonar | Assignee: | Generic Inbox <sonar-inbox> |
| Status: | RESOLVED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | akurtakov, bernd.hufmann, mistria, webmaster |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Marc-André Laperle
I've taken a peak and there doesn't seem to be much difference between your job and the cdt-sonar job(aside from their not using jacoco). A few quick searches on Google didn't turn up anything that looked promising. -M. (In reply to Eclipse Webmaster from comment #1) > I've taken a peak and there doesn't seem to be much difference between your > job and the cdt-sonar job(aside from their not using jacoco). Thanks for looking at it. cdt-sonar does use jacoco as well, it is done in the pom.xml. It sounds to me that there is something wrong with the environment of the build because with the same Hudson version, Java, Sonar and same job configuration (aside from proxy) then it works with my VM (Ubuntu 13.10). Maybe it would be worth trying to create the same job on the CDT HIPP to see if that changes anything? I copied the job (copy/pasted manually) to the CDT instance and it worked, code coverage is properly calculated. https://hudson.eclipse.org/cdt/job/temporary-linuxtools-sonar/ There must be some difference between the two machines that affects the result but I can't figure out what. The Maven, Java versions are the same. The only thing I can see in the log that's different is the kernel version: 3.0.76-0.11-default for CDT and 3.0.74-0.6.8-default for Linux Tools. I don't think that would have anything to do with it though... Maybe you should try "mvn clean install" instead of "mvn clean verify" to help SonarQube maven plugin in resolving classes. Also, are you sure the path that you give the sonar (apparently $WORKSPACE/jacoco.exec) actually contains the report file? I believe it's better to set the sonar.jacoco.reportPath property in job configuration (For both regular build and SonarQube), and make sure jacoco-maven-plugin uses this property to put reports, and uses "append". It turns out that when I copy/pasted the job to the CDT machine, I forgot to copy the "profiles" field in the maven build. It turns out that was the key to making it work! I'm not sure what's wrong with this specific profile (build-server) but it works for now. I can investigate what's wrong with this profile on my own to document the real issue but I'll mark this as fixed since this is not a problem with the Eclipse infrastructure. Thank you for your help! |