Code Coverage Tool Reference Manual
Running the Code Cover Utility
HP Code Coverage Tool Reference Manual for HP Integrity NonStop NS-Series Servers—542684-004
6-3
Preparing the SPI File
Preparing the SPI File
The codecov utility requires a single SPI file. The default name for the SPI file is:
pgopti.spi if the program was compiled on Windows
pgopti.spi if the program was compiled in the OSS environment and the current
directory is an OSS directory
pgospi if the program was compiled in the Guardian environment
pgospi if the program was compiled in the OSS environment and the current
directory is a Guardian subvolume
You can use the -spi option to specify a different name. codecov always looks for the
SPI file in the current folder; move the file from the compilation folder to the
workstation, renaming it if necessary.
The SPI file is a text file that contains information about the various source files. For
each source file, the file includes information about the functions in that source file.If
your application is compiled in multiple directories or subvolumes and therefore more
than one SPI file exists for it, you must manually concatenate the files into one SPI file
for input to codecov. The codecov utility ignores any duplicate information.
Creating a single SPI file from multiple SPI files is not complex. SPI files are text files,
and all you need to do is concatenate them. However, when a SPI file is created on the
Guardian platform, it is somewhat cumbersome to edit because it is a code 180 file
and, in general, cannot be converted to an edit file, because the lines are too long. For
convenience, move SPI files to the OSS or Windows platform and concatenate them
there.
Preparing the DPI File
Identify the latest DPI file produced as output from profmrg. The default name for the
DPI file is pgopti.dpi; you can use the -dpi option to specify a different name. The
codecov utility always looks for the DPI file in the current folder.
The DPI file contains the names of source files whose code was actually executed
during the test run. If a given source file name occurs in the SPI file but not the DPI file,
codecov deduces that none of the code in that source file was covered, and the code
coverage report reflects that conclusion. Similarly, if a source file name occurs in the
DPI file but not in the SPI file, codecov ignores the profile information about that file,
because the report includes information only for source files listed in the SPI file.
These assumptions make it necessary for corresponding source file names in the SPI
files and DPI files to match. They should automatically match, unless you moved or
renamed them between the time you compiled them, producing a SPI file, and the time
you ran them, producing a raw data file (from which profmrg produces the DPI file).










