Fix yangtools sonar test coverage 34/92834/2
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 1 Oct 2020 19:21:06 +0000 (21:21 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 1 Oct 2020 19:28:28 +0000 (21:28 +0200)
We want to be using aggregate execution profile, but those reports
are currently broken, as sonar just picks up individual execution
reports.

Make sure sonar reporting also runs jacoco:report with the aggregate
file, so Sonar ends up with aggregate execution reports.

Change-Id: Iec0a0703608e0f4879425a27e5a66a6d244f731e
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
jjb/yangtools/yangtools.yaml

index 9f1cde28ad469e64c69677764455580b6facf608..5e64c12657bd2e0e397d74f73daca5c0a3e50dbc 100644 (file)
       - gerrit-maven-sonar:
           mvn-params: >
             -Dodl.jacoco.aggregateFile=$WORKSPACE/target/jacoco.exec
-            -Dsonar.jacoco.reportPath=$WORKSPACE/target/jacoco.exec
             -Dskip.karaf.featureTest=true
+          sonar-mvn-goal: >
+            jacoco:report -Djacoco.dataFile=$WORKSPACE/target/jacoco.exec
+            sonar:sonar
 
     project: "yangtools"
     project-name: "yangtools"