Repository navigation
Code Coverage ignores most units #19
Description
Activity
I doubt whether it is an issue with the tool itself, I think it is a configuration issue. However, I would like to be able to reproduce it and see where it fails. Is it possible that you share a private repository with me so I can have a look at it?
Sorry, I'm afraid I'm not a liberty to share this project. However, maybe you can tell me what to do in order to get some relevant data on the problem. Unfortunately, neither the verbose output was of any help to me (it only displayed the list of modules and files, followed by the result after a 5 minute wait), nor was a log file produced despite me specifying -lt.
Same here. I debugged some ...
I found all filenames contining at least one dot are corrupted.
This happens at line "UnitLine := PathExtractFileNameNoExt(UnitLine);"
In the readme i did not found the information if the files have to contain extension or pathIn addition parameter '-ife' doesn't work cause TCoverageConfiguration.ParseSwitch is called after this.
Ok, we need to investigate and fix these issues to move forward. I'm not familiar with that codebase yet though. But if somebody is not proficient with GitHub creating a pull request for the necessary changes I might do them and create the pull request.
I'll have some time to check it today
Can you try to put -ife switch before -uf, because if it affects parsing of include file.
Thanks a lot. With this option in front the file handling after a short try it seems to be correct. However in my opinion the order of the parameters should not matter.
Have you checked the demo showing the issue I linked to here:
#33The link is valid for a little less than 30 days now.
I add the -ife switch just before -uf now in my wizard, as I didn't add it before. Is this a good idea to add this generally?
Yes, because it affects -uf processing.
Is this a configuration issue on my end? Is there something I can do to get Delphi Code Coverage to cover my entire code? Or > is this an issue with Delphi Code Coverage?
Did you try this -ife switch in your test meanwhile? Does it help?
I've got it on my to-do list. I'll check it out when I get around to it. I'm reasonably sure that I didn't, so I am curious to see what result it will produce.
Slight update: I tried getting it to run again today, and found that the new version of DCC was blocked by F Secure Deep Guard again (just like the last version), which heuristically classified it as Malware. This also happened the last time I tried this and I had to wait, like, a week for them to unblock it. Any idea why this happens and if there's anything that can be done about this?
I don't think there is anything we can do about it, since by its nature DCC does set breakpoints in .exes, read other process memory, etc. all actions that can be deemed suspicious, although I did not have it blocked by other AV products.
Some AV products allow to exclude certain files or directories. That would help, if possible for FSecure.
Yup, I expected as much. So this is just to keep you posted that now I'll have to wait until they unlock it, which might at worst case take until the new year =>,<=
Anyway, FYI, here's the complete error message that F-Secure threw out. Not that I think it will help much, but maybe it's something to laugh/cry about in the meantime:
Sicherheitsalarm: DeepGuard hat eine Anwendung blockiert, da es sich nicht um eine gängige Anwendung handelt. [...] Details: DeepGuard hat eine Anwendung blockiert, da diese allgemein nicht verwendet wird. Anwendungspfad: C:\Programs\Delphi Code Coverage\CodeCoverage.exe Datei-Hash: 7c898f62b3b1e2f04a94764736fde96280ccbaf3 Erkennung: Suspicious:W32/Malware!DeepGuard.ag Seltenheit: Rare Reputation: Unknown Prozess-ID: 16528If the CodeCoverage.exe would be digitally signed it might not happen, as F-Secure might be able to trace the certificate and then accept that it's a legal/proper app. Not sure if that works and yes, a certificate costs money.
I am working on a Delphi project with 230 units in it and tried running Delphi Code Coverage on it using the Delphi Code Coverage Wizard, but in the end result, only 19 of the 230 units were included, despite Delphi Code Coverage printing "Will track coverage for:" for each of the 230 units (using verbose output).
Also, I know that the code is roughly 80.000 lines long, but Delphi Code Coverage only recognized about 6.000 of those.
Here's the strings that I ran (both created the same result:
CodeCoverage -e PBeratungsapp_Tests.exe -m PBeratungsapp_Tests.map -uf test_results/script/dcov_units.lst -spf test_results/script/dcov_paths.lst -od test_results -lt -xml -html -vCodeCoverage -e PBeratungsapp_Tests.exe -m PBeratungsapp_Tests.map -uf test_results/script/dcov_units.lst -spf test_results/script/dcov_paths.lst -od test_results -lt -xml -html -v -ifeHere's the files that were generated by the wizard (converted to .txt so that GitHub lets me upload them):
dcov_paths.lst.txt
dcov_units.lst.txt
Is this a configuration issue on my end? Is there something I can do to get Delphi Code Coverage to cover my entire code? Or is this an issue with Delphi Code Coverage?