You can convert coverage data to PureCoverage ASCII export format for processing by a report script. To convert data to export format select File > Write export script from the PureCoverage Viewer. From the command line, use the syntax:
% purecov -export=tests.export test1.pcv test2.pcv test3.pcv...
To supply export data directly to a report script, use the syntax:
% purecov -export=tests.export test1.pcv | <report script>
In export format, each line is an individual coverage data record. Each line begins with a keyword that indicates the type of coverage data. The data fields that follow are positional and are separated by tabs. Blank lines can appear in the file.
You can add comments to an export file. Comments must appear on a separate line, and must begin with a # symbol. A comment runs from the # symbol to the end of the line.
For
the data fields in each line are identified by the following keywords:
Keyword |
Line |
Type of information |
Summary information about all the data | ||
Start of information about a source directory | ||
End of information about a source directory | ||
Start of information about a file | ||
End of information about a file | ||
Start of information about a function | ||
End of information about a function | ||
Information about a single line of source code | ||
Information about a single basic block of object code |
The information in export files is nested hierarchically. but not indented to show the nesting. In this example, the directory /usr/home/pat/demo contains the file hello_world.c. The file hello_world.c contains the functions display_hello_world, display_message, and main, and each function contains a number of blocks and lines.