Mode options for analyzing data

Three of the four analysis-time mode options, -view , -export, and -merge, work with the same input, .pcv files, but generate different output:

The fourth analysis-time mode option, -extract, uses source files as input, and generates or updates the file ~/.purecov.adjust:

Option

Default

-export

 

This option instructs PureCoverage to generate export data from one or more .pcv files. For example, use the command

% purecov -export=result.export a.pcv

to save export data from the a.pcv file in the result.export file. Use the following command to save export data from the merged a.pcv and b.pcv files in the result.export file:

% purecov -export=result.export a.pcv b.pcv

Note: When you use the -export option on multiple files, PureCoverage performs an implicit merge, but does not save the results in a merged .pcv file.

If you do not set a value, PureCoverage sends its output to stdout. For example, use the command

% purecov -export a.pcv b.pcv

to send export data for the merged a.pcv and b.pcv files to stdout.

Compatible Options: You can use the following option on the command line when you start PureCoverage in export mode: -apply-adjustments.
 

-extract 

 

This option extracts coverage adjustments from specified source files and stores them in the file ~/.purecov.adjust. For example, use the command

% purecov -extract file1.c file2.c

Note: Choosing Extract adjustments from all files from the Viewer Adjustments menu is equivalent to running this option for all source files listed in the .pcv data in memory.

Compatible Options: None.
 

-merge 

 

This option instructs PureCoverage to merge the coverage data from multiple .pcv files, and write a merged .pcv file. For example, use the command

% purecov -merge=result.pcv a.pcv b.pcv

to merge a.pcv and b.pcv into result.pcv.

Note: You must specify an output file with this option.

Compare also the two following examples:

% purecov -merge=result.pcv a.pcv

% purecov -merge=result.pcv result.pcv b.pcv

The first example is just a way to copy a.pcv to result.pcv. The second instructs PureCoverage to read result.pcv completely, and then combine it with b.pcv before overwriting result.pcv with the new, merged data.

Compatible Options: You can use the following option on the command line when you start PureCoverage in merge mode: -force-merge.
 

-view 

 

This option displays coverage data for one or more .pcv files in the PureCoverage Viewer. For example, use the command

% purecov -view a.pcv

to display the a.pcv data in the Viewer. Use the following command to display data from the merged a.pcv and b.pcv files in the Viewer:

% purecov -view a.pcv b.pcv

Note: When you use the -view option on multiple files, PureCoverage performs an implicit merge, but does not save the results in a merged .pcv file.

Note: By default, PureCoverage does not invoke the Viewer at run time. You must invoke it after collecting coverage data from one or more test runs.

Compatible Options: You can use the following options on the command line when you start PureCoverage in view mode: -force-merge, -user-path.