Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ tcreport(1) — Centerline TestCenter 1.0.2 &beta1.0

Media Vault

Software Library

Restoration Projects

Artifacts Sought

TCREPORT(1)

NAME

tcreport reads one or more results files and produces a report
 

SYNTAX

 
tcreport [proofed_binary_name] [switch ..] [resultsfile ..]
 

DESCRIPTION

 
Without any argument, tcreport prints the summary for all results files in the working directory. 

If you specify a proofed_binary_name, tcreport processes proofed_binary_name.tcinit and reports the most recent results generated by proofed_binary_name.  A proofed_binary_name is a TestCenter version of an executable; it is created with the proof command. 

If you specify one or more results files, tcreport reports the  results in the specified results files.  You can use an asterisk (∗) to indicate all versions or all execution runs. 

You must specify either a binary or results file(s) or neither; you cannot specify both a binary and results file(s). 
 

SWITCHES

 

-coverage itemSummarize coverage by item, which is one of the following: func, class, file, dir. 
 
If item is not specified, the default value is func.
 
For instance, the following command generates a report of coverage by classes for the most recent execution of a.out:

% tcreport a.out -coverage class

For instance, the following command generates a report of cumulative coverage for all executions of a.out:

% tcreport a.out -cumulative -coverage

-errors
Reports errors. See "error and leak messages" in the TestCenter User’s Guide and Reference for more information about the kinds of errors reported. 
 

-filter

       [ name=regexp

       | file=regexp ]Report code coverage only for name or file, each specified by a regular expression
 
For example, the following command generates a report of the most recent coverage results for demo.tc for all names that begin with "init_":

% tcreport demo.tc -filter name=’init_∗’

       [ lt=num1

       | gt=num2 ]Report code coverage for results less than num1 percentage and greater than num2 percentage.For example, the following command generates a report for the most recent coverage results for demo.tc with a coverage rating between 24 and 76 percent:
 
% tcreport demo.tc -filter gt=25 -filter lt=75
 

-help
 
Prints usage information for the tcreport command

-leaksPrint leaks

-list filenameGenerates a copy of filename that shows lines not executed with an "M" (missed) in the leftmost column. 
 
For instance, the following command creates a file named rectangle.c.tc with several lines marked ‘M’:
 
% tcreport -list rectangle.c demo.tc.1.2
 
 The M indicates that these lines were not executed when the results in demo.tc.1.2 were generated.

-sort1

       [ low_coverage

       | high_coverage

       | name

       | file         ]Use one of these keys as the primary sort key for printing results: low_coverage (lowest percentage is first), high_coverage (highest percentage is first), name (in order of the ASCII collating sequence, according to name of function or class), file ( in order of the ASCII collating sequence, according to name of file)

-sort2

       [ low_coverage

       | high_coverage

       | name

       | file         ]Use one of the previously listed keys as the secondary sort key for printing results

-sort3

       [ low_coverage

       | high_coverage

       | name

       | file         ]Use one of the previously listed keys as the tertiary sort key for printing result. 

-verboseGenerates Property informaton for the results. This is the same information available when you choose Show Properties from the Files pulldown menu in the Error Browser and the Leak Browser. 

GENERATING REPORTS WITHOUT THE GUI

You can also get information on the tcreport command by typing the following at the shell:

$ tcreport −help

Use tcreport to generate reports of errors, leaks, and code coverage for a particular program that you have proofed. For instance, you can type the following for a summary on my_program.tc, the program proofed in the preceding example:

$ tcreport_program.tc

TO RUN A BATCH TEST SUITE

You can run a proofed executable from a script, a pipe, or a daemon, by substituting the name of the proofed executable where you would ordinarily use the regular executable. You should also set the environment variable TC_NOGUI to prevent the GUI from starting, set TC_SILENT to prevent results from going to standard error, and optionally set the TC_RESULTDIR and TC_COMMENT variables. 

For instance, here’s part of a script testing the demo.tc program:

setenv TC_NOGUI
setenv TC_SILENT
mkdir results
setenv TC_RESULTDIR results
demo.tc
demo.tc rectangle
tcreport -cumulative -coverage demo.tc > demo.coverage
unsetenv TC_NOGUI
unsetenv TC_SILENT
unsetenv TC_RESULTDIR

TestCenter creates a results file for each test run, showing error, leak, and coverage information. You can view these results just as you view any other TestCenter results, by starting TestCenter with the testcenter command. When you select a results file in the Main Window and click the Show Properties menu item from the File menu, the description of the test suite appears as a User Comment. 
 

See Also

 
testcenter.1 tctutor.1 proof.1

SunOS 1.0.2 &beta1.0  —  Last change: 1 July 1993

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