-
Notifications
You must be signed in to change notification settings - Fork 365
Description
Hi.
I'm trying to get Sonarqube to understand boost test results from some production code. My code is laid out like this due to some internal recommendations -
Base -> Lib
-> Test
The actual code resides in the Lib directory. Based on information from various Confluence pages here, I've created a sonar-project.properties file at the level of the Base directory with these entries -
sonar.projectBaseDir=.
sonar.sources=Lib/
sonar.tests=Test/
sonar.cxx.xunit.xsltURL=boosttest-1.x-to-junit-1.0.xsl
sonar.cxx.xunit.reportPath=boost*.xml
As per https://github.com/wenns/sonar-cxx/wiki/Test-runners, I generated a boost result file like this -'mytest.exe --output_format=XML --log_sink=boostlog.xml --log_level=all --report_level=no'. I then ran sonar-runner -X to see what was happening. The runner created a transformed file for the test report with entries like this -
The sonar-runner section for the parsing of the test report contained this -
12:51:12.180 DEBUG - Using pattern 'boost*.xml' to find reports
12:51:12.181 INFO - Processing report 'Z:\src\lib\BlobStorage.\boostlog.xml'
12:51:12.181 DEBUG - Transforming the report using xslt 'boosttest-1.x-to-junit-1.0.xsl'
12:51:12.311 INFO - Parsing report 'Z:\src\lib\BlobStorage.\boostlog.xml.after_xslt'
12:51:12.374 DEBUG - Cannot find the source file for test 'BlobStore_test.BlobReadsuite.', creating a dummy one
12:51:12.375 DEBUG - Cannot find the source file for test 'BlobStore_test.BlobSparseWritesuite.BlobStore_test', creating a dummy one
12:51:12.375 DEBUG - Cannot find the source file for test 'BlobStore_test.BlobStoragePresentShare.BlobStore_test', creating a dummy one
12:51:12.375 DEBUG - Cannot find the source file for test 'BlobStore_test.BlobStoragePresentShare.', creating a dummy one
12:51:12.376 DEBUG - Cannot find the source file for test 'BlobStore_test.blobStoragePresentRemoveShareAndLinks.BlobStore_test', creating a dummy one
12:51:12.376 DEBUG - Cannot find the source file for test 'BlobStore_test.BlobDeletesuite.BlobStore_test', creating a dummy one
12:51:12.376 DEBUG - Cannot find the source file for test 'BlobStore_test.BlobWritesuite.BlobStore_test', creating a dummy one
12:51:12.377 INFO - Sensor CxxXunitSensor done: 403 ms
End result - no test results show in the relevant Sonarqube project. Am I doing something wrong? Or can boost results not be parsed right now? These are the tool versions that I'm using in my setup -
Sonarqube - 4.3
C++ (community) - 0.9.1
Boost - 1.44
Since the logs pertain to production code, I'm not attaching them wholesale, but can email them if needed.
Thanks,
Shishir