Justification rules in coverage report are no longer recognized in new model version
6 views (last 30 days)
Show older comments
I have a Simulink model built from a frame and core.The core consists of several library functions and for each library function there is a coverage filter. The core is copied in the frame each time a new frame is to be used in the project. The problem here is that the justification rules defined in the old version of the coverage filter are no longer recognized in the new model version. you need to copy the justifications from the old coverage report and paste them into a new coverage filter in the new model.
Why are the justification rules from the older version not automatically recognized by the coverage filter? How to solve this problem?
3 Comments
Pat Canny
on 14 Apr 2023
I am working on a potential solution for you, but wanted to see if this preliminary idea made sense.
The proposed workflow below is just meant to show the functions you could use, but it would require some updates to make it scalable (for instance, this just shows how to apply a filter to a block with a given name).
If the names are kept the same, you could try something with Simulink.findBlocks and slcoverage.BlockSelector, like so (for a given block):
openExample('slcoverage/CreatingAndUsingCoverageFiltersExample');
blockName = 'protected division';
blockHandle = Simulink.findBlocks(gcs,'Name','protected division'); % name must match
bl = slcoverage.BlockSelector(slcoverage.BlockSelectorType.BlockInstance,blockHandle);
rule = slcoverage.FilterRule(bl,'defensive modeling',slcoverage.FilterMode.Exclude);
filt = slcoverage.Filter;
filt.addRule(rule);
Answers (0)
See Also
Categories
Find more on Verification, Validation, and Test in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!