Sysprogs forums › Forums › VisualGDB › Setting location of coverage reports through command line
- This topic has 10 replies, 3 voices, and was last updated 5 years, 9 months ago by dabramson.
-
AuthorPosts
-
February 7, 2018 at 21:11 #19994dennykParticipant
First of all, is there a list of options when running visualGdb from command line somewhere?
My issue is I want to run my unit test and get the report in the location I specified in ‘VisualGdb Project Properties -> Code Coverage -> Directory to store coverage reports’, and that location is on my PC, not on my target hardware. When I run my unit test using visual studio’s test explorer, I can see the test report in the location specified. But the problem is, I need to run this test using a batch script, which I can do, but I cannot find the coverage report anywhere. Can someone help me?
- This topic was modified 6 years, 9 months ago by dennyk.
February 8, 2018 at 01:36 #19997supportKeymasterHi,
Please try this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.1.2048.msi
It will reuse the normal coverage report logic when launched from command line.
February 8, 2018 at 16:00 #20005dennykParticipantHi,
Thanks for the help, with that version, I can see the scovreport file, but I also set the option for “Keep raw coverage reports”. I can see the directory that normally contains the raw coverage reports if I run my test from visual studio’s test explorer, but it is empty, the job.txt is there, but also empty. It’s those raw coverage files that I really need, especially the gcda files as I do the processing on my own. Is there a way that can be fixed? Or is there another version that also has that fixed? Or is there a command line option I need to use? Please help…
- This reply was modified 6 years, 9 months ago by dennyk.
February 9, 2018 at 06:26 #20011supportKeymasterHi,
All VisualGDB settings from Tools->Options->VisualGDB are stored in registry under HKEY_CURRENT_USER\Software\Sysprogs\VisualGDB\Settings. If you are running VisualGDB on a machine without Visual Studio, we would advise simply exporting the settings from a regular machine via a .reg file and applying them on the second machine.
February 9, 2018 at 12:57 #20016dennykParticipantHi,
I’m running it on the same machine where if i run my test from visual studio’s test explorer, i see the raw files. So i believe i wouldn’t need to export those settings. So is there any other explanation why the raw files are not kept if i run it through command line?
February 9, 2018 at 19:08 #20023supportKeymasterHi,
As long as the KeepRawCoverageReports registry setting is set to 1, VisualGDB should keep the reports. Please try deleting the coverage report directory, running the tests via command line and let us know which exact files/directories were created. This should explain what is going on.
February 9, 2018 at 20:01 #20025dennykParticipantHi,
I checked the registry editor to make sure, “KeepRawCoverageReports” under HKEY_CURRENT_USER\SOFTWARE\Sysprogs\VisualGDB\Settings\Common\Profiling is 1. So I should be good.
And I remove all old coverage reports from my build dir, which is where I set it to be. and Run “<path_to_visualgdb>\VisualGDB.exe /runtests <path_to_container>\adrv9010gdbgtest.vgdbtestcontainer /output:testOutput.xml” from command line. And when I checked my build_dir again, there is the scovreport file, and the directory with a timestamp. But that directory only contains an empty job.txt file and nothing else.
So what am I missing here? I believe there should be gcda gcno and gcov files in that directory with a time stamp.. Please help..
February 9, 2018 at 21:20 #20026supportKeymasterHi,
The empty .job would normally mean that VisualGDB could not locate any raw coverage reports after running the project. This might be caused by some combination of settings that prevents VisualGDB from locating the files when running from command line.
Could you please check if you can reproduce this problem on a clean test project created via VisualGDB project wizard?
February 9, 2018 at 22:23 #20027dennykParticipantHi,
Before trying that..
Now I am suspecting that visualGdb fails to find the debug files from HW target..
When copying debug files from HW target, where are they expected to be? In my case I find them manually in directory specified in ‘Project properties -> Configuration Properties -> instrumentation -> Coverage Report Directory’\<Project_Name>\<Project_Config>, which I never changed, seems to be the default and seems to work when I run everything from the GUI. The one that I changed is under ‘VisualGdb Project Properties -> Code Coverage -> Directory to store coverage reports’, which is set to somewhere in my PC.
So what is the difference for the path set under project properties and the path set under visualGdb properties?
Is it possible that when test is run from GUI, it knows the gcda files are in the path set under project properties and not when it’s run from cmd line? If that is the case, what path am I supposed to set for the one under project properties?
February 10, 2018 at 05:46 #20032supportKeymasterHi,
We have managed to reproduce the problem. VisualGDB was not properly copying coverage directory information to the test container file when building it outside Visual Studio.
We have fixed it in this build: http://sysprogs.com/files/tmp/VisualGDB-5.4.1.2055.msi
If you encounter any further problems, feel free to contact us again.
- This reply was modified 6 years, 9 months ago by support.
February 5, 2019 at 17:59 #23700 -
AuthorPosts
- You must be logged in to reply to this topic.