Using PureCoverage options

You can specify PureCoverage options:

This is also the order of precedence (environment variable, link line, mode option) in which PureCoverage processes the options.

Note: PureCoverage can also collect coverage data for Java applications running on a Solaris SPARC 32-bit Java virtual machine (JVM); for information about PureCoverage options relevant to Java code, click

Syntax

Option types

PureCoverage supports two types of options:   string and boolean:

Specifying options in environment variables

You can specify PureCoverage options in the environment variables PURECOVOPTIONS or PUREOPTIONS. Values in PUREOPTIONS apply to PureCoverage, Purify, and Quantify software products. Values in PURECOVOPTIONS take precedence over values in PUREOPTIONS.

PureCoverage applies build-time options specified in environment variables when it builds instrumented applications. Any build-time options on the link line override build-time environment variables.

PureCoverage applies run-time options specified in environment variables when you run instrumented applications. The run-time environment values in force when you run the program override any values specified on the link line.

If an option is specified more than once in an environment variable, PureCoverage applies the first value. To add an overriding value for the -log-file option without changing other options specified, use a command like:

csh % setenv PURECOVOPTIONS "-log-file=new \
   $PURECOVOPTIONS"
 ksh $ export PURECOVOPTIONS="-log-file=new \
    $PURECOVOPTIONS"

For information about specifying options when you are using Purify with PureCoverage, click

PUREOPTIONS

You can use the PUREOPTIONS environment variable to set options that apply to all users of PureCoverage, Purify, and Quantify software products. PUREOPTIONS is convenient for specifying defaults that apply to all three applications.

For example, if your site has a central shared file that is sourced by all users' .cshrc or .profile files, you can set cache-dir=/alternate/dir in the environment variable PUREOPTIONS to apply to all users.

Specifying options on the link line

You can specify build-time and run-time options on the link line. For example:

% purecov -cache-dir=${HOME}/pcache \
 -always-use-cache-dir $CC ...

Build-time options apply to the PureCoverage build command being run.

Run-time options are built into the executable and become the default values for the instrumented executable. This provides a convenient way to build a program with nonstandard default values for run-time options. For example:

% purecov -force-merge $CC ...

Notes: