cvload

Load coverage tests and stored results into memory

Syntax

[tests, data] = cvload(filename)
[tests, data] = cvload(filename, restoretotal)

Description

[tests, data] = cvload(filename) loads the tests and data stored in the text file filename.cvt. tests is a cell array of cvtest objects that are loaded. data is a cell array of cvdata objects that are loaded. data has the same size as tests, but if a particular test has no results, data can contain empty elements.

[tests, data] = cvload(filename, restoretotal) restores or clears the cumulative results from prior runs, depending on the value of restoretotal. If restoretotal is 1, cvload restores the cumulative results from prior runs. If restoretotal is unspecified or 0, cvload clears the model's cumulative results.

The following are special considerations for using the cvload command:

  • If a model with the same name exists in the coverage database, the software loads only the compatible results that reference the existing model to prevent duplication.

  • If the Simulink® models referenced from the file are open but do not exist in the coverage database, the coverage tool resolves the links to the existing models.

  • When you are loading several files that reference the same model, the software loads only the results that are consistent with the earlier files.

  • Starting in R2020b, you can load coverage data from previous releases. Coverage data as far back as R2017b is supported. You can aggregate coverage data from two or more cvdata objects if the dbVersion properties match.

Examples

Store coverage results in cvtest and cvdata objects:

[test_objects, data_objects] = cvload(test_results, 1);
Introduced before R2006a