Code Coverage Report Generator - attolcov

Purpose

The Report Generator creates Code Coverage reports from the coverage data gathered during the execution of the application under analysis.

Syntax

attolcov {<fdc file>} {<traces>} [<options>]

where:

  • <fdc files> The list of correspondence files for the application under test, with one file generated for each source file during instrumentation

    <traces> is a list of trace files. (default name attolcov.tio)

    <options> represents a set of options described below.

Parameters can use wild-card characters ('*' and '?') to specify multiple files. They can also contain absolute or relative paths.

Description

Trace files are generated when an instrumented program is run. A trace file contains the list of branches exercised during the run.

You can select one or more coverage types at the instrumentation stage.

All or some of the selected coverage types are then available when reports are generated.

The Report Generator supports the following coverage type options:

-PROC[=RET]

The -PROC option, with no parameter, reports procedure inputs.

Use the RET parameter to reports procedure inputs, outputs, and terminal instructions.

-CALL

Reports call coverage.

-BLOCK[=IMPLICIT | DECISION | LOGICAL | ATC]

The -BLOCK option, with no parameter, reports statement blocks only.

  • IMPLICIT or DECISION (equivalent) reports implicit blocks (unwritten else and default blocks), as well as statement blocks.

    LOGICAL Reports logical blocks (loops, as well as statement and implicit blocks.

    ATC Reports asynchronous transfer control (ATC) blocks, as well as statement blocks, implicit blocks, and logical blocks.

-COND[=MODIFIED|COMPOUND]

The -COND option, with no parameter, reports basic conditions only.

MODIFIED reports modified conditions as well as basic conditions.

COMPOUND reports compound conditions as well as basic and modified conditions.

Explicitly Excluded Options

Each coverage type can also be explicitly excluded.

-NOPROC

Procedure inputs, outputs, or returns are not reported.

-NOCALL

Calls are not reported.

-NOBLOCK

Simple, implicit, or logical blocks are not reported.

-NOCOND

Basic conditions are not reported.

Additional Options

The following options are also available:

-FILE= <file>{[, <file>]} | -EXFILE= <file>{[, <file>]}

Specifies which files are reported or not. Use -FILE to report only the files that are explicitly specified or -EXFILE to report all files except those that are explicitly specified. Both -FILE and -EXFILE cannot be used together.

-SERVICE=<service>{[, <service>]} | -EXSERVICE=<service>{[, <service>]}

Specifies which functions, methods, and procedures are to be reported or not. Use -SERVICE to report only the functions, methods and procedures that are explicitly specified or -EXSERVICE to report all functions, methods, and procedures except those that are explicitly specified. Both -SERVICE and -EXSERVICE cannot be used together.

-TEST= <test>{[, <test>]} | -EXTEST= <test>{[, <test>]}

Specifies which tests are reported or not. Use -TEST to report only the tests that are explicitly specified or -EXTEST to report all tests except those that are explicitly specified. Both -TEST and -EXTEST cannot be used together.

-OUTPUT= <file>

Specifies the name of the report file (<file>) to be generated. You can specify any filename extension and can include an absolute or relative path.

-LISTING[=<directory>]

This option requires annotated listings to be generated from the source files. Annotated listings carry the same name as their corresponding source files, but with the extension .lsc. The optional parameter <directory> is the absolute or relative path to the directory where the listings are to be generated. By default, a listing file is generated in the directory where its corresponding source file is located.

-NOGLOBAL

Reports the results of each test found in the trace file, followed by a conclusion summarizing all the tests. If a test has no name, it is identified as "#" in the report. A test is an execution of an instrumented application, a TEST as defined for Component Testing for C and Ada, or a dump-on-signal. By default, the report is not structured in terms of tests.

-BRANCH=COV

Reports branches covered rather than branches not covered. It does not affect listings, where only branches not covered are indicated with the source code line where they appear.

-CLEAN=<file.tio>

Generates a new cleaned up .tio file that takes up less disk space. You can delete the original .tio file after using this option.

-MERGETESTS

When using the -CLEAN option, merges previous results in order to produce a more compact file.

-SUMMARY=CONCLUSION | FILE | SERVICE

This option sets the verbosity of the summary:

  • CONCLUSION reports only the overall conclusion.

    FILE reports only the conclusion for each source file, and the overall conclusion.

    SERVICE reports only the levels of coverage for each source file, each C function, and overall. The list of branches covered or not covered is not included.

-STUDIO_LOG

This option is for internal usage only.

Return Codes

After execution, the program exits with the following return codes:

Code Description
0 End of execution with no errors
7 End of execution because of fatal error
9 End of execution because of internal error

All messages are sent to the standard error output device.