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.).
Hi Jim,
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.
Cheers
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Somesh,
There's no need to rename files. Please use the initstring attribute in the <clover-report> task.
Cheers
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marek
Following your advice the name is now correctly resolved. But it still gives me an error stating "No coverage recordings found. No report will be generated". Is it because I am genrating the db in Linux and trying to report on windows?
Thanks Somesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marek,
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.
Somesh
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Somesh,
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.
Cheers
Marek
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Marek,
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:
https://answers.atlassian.com/questions/251117/is-source-code-location-hardcode-in-clover-registry-file,
Thanks,
Kai
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.