Command Line: Test Coverage
SKILL Test Coverage lets you determine which code was executed during a session. This information lets you increase the coverage of your test cases and thereby improve the quality of your SKILL code.
Test coverage only measures statements inside a function. Top-level statements or statements that are not within the function body are not covered.
When you start up SKILL test coverage, you must pass the executable command line arguments telling SKILL which files to measure. When those files are loaded, they automatically compile the functions to include tCov instructions. When the SKILL session ends, report files are written out.
virtuoso {-ilTCovfileNames| -ilTCovListfileName} [-ilTCovDirdirectory] [-ilTCovReportsOnly]
Because you enter these commands at the shell level, you use the shell syntax, hence the dash options and the single quotes around the file names, to submit them as one argument to the option.
virtuoso -ilTCov 'block.il tools.il' -ilTCovDir /tmp/test
ilTCov
ilTCov followed by a list of files is the only argument required to run SKILL Test Coverage. You can also pass the list of SKILL files in the current directory.
ilTCovDir
Takes the directory into which all report files are written as its argument. If this argument is not given, the report files are written to the same directory from which the SKILL files being measured were loaded.
ilTCovList
A text file containing the name of the source files to be instructed for code coverage. For example:
virtuoso -ilTCovList files.dat -ilTCovDir ./tcov
In the above example, files.dat is a text file with the SKILL source file names to be instructed. Each file name is in its own line without any path information.
ilTCovReportsOnly
Allows you to print only the summary report files and not the files that show the source code annotated with test coverage information. This option greatly reduces exit time during test coverage.
ilTCovUseFullFileName
The current tcov report file names are generated from the given source file names by replacing their file extension with tcov extension. For example file1.api would have its tcov report file as file1.tcov.
This becomes a problem if there are multiple source files with different extensions sharing the same base name. For example, file1.api and file1.cb. The coverage report for these files cannot be captured correctly because their tcov report filenames are the same.
Using ilTCovUseFullFileName instructs SKILL tcov to preserve the original source file extension to avoid the report file name collision issue. For the same example, the correct tcov reports are in file1.api.tcov and file1.cb.tcov.
Related Topics
Command Line Interface for SKILL Profiler
Return to top