I created a sar with instrumented code using clover on my windows machine and later deployed it on a linux box specifying key file and database path in run.sh.
Started Jboss and could see the database files getting generated and updated. After shutting down Jboss I copied the db files back to my windows machine and tried creating the clover report. It showed an error saying could not find files with name clover3_1_11.db. So I renamed the files as desired. Ran the report again and this time it said "Could not find any coverage data". I made sure that I had renamed all other db/coverage files as well.
Please help...I wonder where I am going wrong.
I tried deploying the sar using a custom clover db name on my windows and went thru the same process of copying and renaming, and this time the reports generated fine.
I dont understand why it worked on windows and not via linux.
There should be no problem going between Linux and Windows. I actually have done this myself - generating the recordings on Linux, then building the reports on Windows. The key is to make sure that the path where the recordings are stored exactly matches where they were stored on Linux. For example, if your recordings were stored to Linux directory /opt/clover.db/foo, then they must be copied to directory C:\opt\clover.db\foo on your Windows system. As far as I know, you can't use a different drive (D:, etc.).
There's no need to use exactly the same path on Linux and Windows. It's sufficient to provide the initstring parameter for <clover-setup> and <clover-report> and ensure that Clover database (e.g. clover.db) and coverage recording files (e.g. clover.dbxxxxxxx, clover.dbxxxxxxx.s) are present in the specified location.
In reponse to the comment given by you for Jim, I would like to point out that even though inititally I had used the initstring parameter it did not help. The report would just not generate even though the DB was generating and updating just fine. May be it was because I had clover installed in /home/%usr%/clover and sar deployed in jboss (/opt/jboss/). Though I had edited the JAVA_OPT giving the path to the database location in home dir. Even though the files generated just fine, I had sent it to threaded/realtime the report could not be generated.
Following Jim's advice I copied over the clover dir to /opt then recompiled and generated the sar. Set path again pointing to opt dir and this time it worked like charm. I feel there could be some issue in the way DB is generated.
I remember one issue related with windows-linux paths: CLOV-1112 but it was already fixed in the Clover 3.1.7.
If you think that the problem still persist, do not hesitate to raise a ticket on support.atlassian.com and attach a code sample with logs, clover database and coverage recording files created. I'll be happy to investigate it.
I'm using Clover 3.1.10, the problem I'm facing now is exactly match what described in CLOV-1112, instrument on Windows and generate report on linux, db file record each source file's absolute path, which resulting win-linux paths like:
[ERROR] Failed to render syntax highlights for /app/QA/D:/perforce/depot/..../example.java
As you mentioned CLOV-1112 is mark as resloved in 3.1.7, but now seems it's still reproducible in 3.1.10.
BTW, I'm using clover maven plugin, details please check my post:
Thanks for signing up for Jira Ops! I’m Matt Ryall, leader for the Jira Ops product team at Atlassian. Since this is a brand new product, we’ll be delivering improvements quickly and sharing updates...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs