You can collect coverage data on your UNIX system and view it on Windows using Rational XDE or Rational PureCoverage for Windows.
To collect coverage data for viewing on Windows, assign the value windows or both to the -view-file-format option.
With the option set to windows, PureCoverage saves coverage data to a .cfy file, which you can analyze using PureCoverage for Windows. With the option set to both, PureCoverage saves data to a .pcv file as well.
PureCoverage for UNIX, by default, merges .pcv files, but does not merge the .cfy files that it creates. You can merge these files in Rational XDE or PureCoverage for Windows manually, or by using the ActiveMerge feature. ActiveMerge allows you to add a dataset to, or remove a dataset from, the merged dataset with a single click. Refer to the PureCoverage for Windows online help system for information about merging datasets.
By default, PureCoverage names .cfy files %v.%p.%n.cfy. The pid number, %p, distinguishes between different runs of the program. The sequence number, %n, distinguishes between data files saved during a single run by multiple calls to the API function purecov_save_data(). Note that, If you assign a value of both to the -view-file-format option, data from multiple saves and multiple runs is saved in separate .cfy files, as usual, but as usual merged into a single .pcv file.
You can assign a name of your own choosing to a .cfy file using the -counts-file option.
Before you can view UNIX coverage data on Windows, you must make your .cfy files and source files available. You can do this by copying files manually or by using a file system shared on UNIX and Windows.
To view annotated source, you must also make sure that PureCoverage for Windows can find your source files. This is a problem because the UNIX pathnames recorded in the .cfy files cannot be resolved on Windows. To help PureCoverage find the source files, you can do any of the following:
Use
the PureCoverage substitute
directive on UNIX to modify the source pathname that is recorded in .cfy files when they are
generated. The directive is:
substitute <unix_path_prefix> <windows_path_prefix>
Both path prefixes must be fully qualified pathnames. The directive
does not work if relative pathnames are specified.
For example, if your UNIX source files are in the directory tree beginning
/people/pat/current,
and you consistently map /people/pat
to drive F: on your
Windows system, you can use the following directive:
substitute /people/pat F:\
Any UNIX pathname beginning with /people/pat is recorded in .cfy files as a Windows pathname
beginning with F:\; for example, /people/pat/current becomes F:\current.
This directive is defined in a .purecov
file. PureCoverage searches for .purecov
files in the current working directory, the user's home directory, and
<purecovhome>.
On Windows, PureCoverage does not use case to distinguish directory
names. If you are using UNIX directories with names that differ only with
respect to case, use the substitute
directive make the directory names unique from the point of view of Windows.
Browse to the source file when prompted by PureCoverage for Windows.
Use the Preferences dialog box in PureCoverage for Windows to specify fully qualified pathname substitutions. See the PureCoverage for Windows online help system for details.