Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tcov(1) — SunOS 3.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

cc(1)

prof(1)

gprof(1)

TCOV(1)  —  USER COMMANDS

NAME

tcov − construct test coverage analysis and statement-by-statement profile

SYNOPSIS

tcov [ −a ] [ −n ] file ... 

DESCRIPTION

Tcov produces a test coverage analysis and statement-by-statement profile of a C or FORTRAN program.  The coverage data for routines contained in a file named file.c or file.f is taken from the corresponding file.d produced by running the C compiler cc(1) or FORTRAN compiler f77(1) with the −a option. 

tcov places an annotated listing of the program with coverage data in file.tcov.  Each straight-line segment of code (or each line if the −a option to tcov is specified) is prefixed with the number of times it has been executed; lines which have not been executed are prefixed with #####. 

Note that the profile produced includes only the number of times each statement was executed, not execution times; to obtain times for routines use gprof(1) or prof(1).

Test coverage data from several runs will accumulate in the .d files. 

OPTIONS

−a display an execution count for each statement; if −a is not specified, an execution count is displayed only for the first statement of each straight-line segment of code. 

−n display table of the line numbers of the n most frequently executed statements and their execution counts. 

SEE ALSO

cc(1), prof(1), gprof(1)

FILES

file.cinput C program file
file.finput FORTRAN program file
file.dinput test coverage data file
file.tcovoutput test coverage analysis listing file
/usr/bin/countpreprocessor for test coverage analysis for C program
/usr/lib/bb_link.oentry and exit routines for test coverage analysis

BUGS

The analyzed program must call exit(2) or return normally for the coverage information to be saved in the .d file. 

‘A premature end of file’ message is issued for routines containing no statements. 

Sun Release 3.0β  —  Last change: 17 September 1984

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026