How to create a .cvf file to exclude external m-files from coverage report?
Afficher commentaires plus anciens
Hi, I'm trying to exclude external m-files coverage from coverage report in Simulink Test. I tried creating coverage filter file refering to https://in.mathworks.com/help/slcoverage/ref/slcoverage.blockselector-class.html
I'm trying to exclude mutiple functions from coverage. Below is my edited script for it.
files = dir('*.m');
for i = 1:length(files)
selector = slcoverage.BlockSelector(slcoverage.BlockSelectorType.BlockInstance, files(i).name);
filt = slcoverage.Filter;
rule = slcoverage.FilterRule(selector, '', slcoverage.FilterMode.Exclude);
filt.addRule(rule);
end
setFilterName(filt,'MFileExclusion');
save(filt,'MFileExclusion')
I tried adding this cvf file to Simulink Test, but its not working. I'm using R2024a.
Is there an issue with the script? Is there any alternate solution here?
Thanks in advance.
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Simulink Report Generator dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!