ACATS 4.1 User's Guide
Title Page
Contents   Index   References   Previous   Next 

6.3.1 Test Summary File Reference

A test summary file is a CSV (Comma Separated Value) file of test summary records. See 6.5, “CSV File Reference” for the general rules for constructing a CSV file.
A test summary file record contains the following comma-separated fields on a single line:
Kind
KIND (see below), ERROR (Error), PERROR (Possible_Error), OERROR (Optional_Error), NAERR (NA_Error), ACRQMT (Annex_C_Requirement), OK (OK), UPACKSPEC (Package_Specification), UFUNCSPEC (Function_Specification), UPROCSPEC (Procedure_Specification), UGENPACK (Generic_Package), UGENFUNC (Generic_Function), UGENPROC (Generic_Procedure), UPACKBODY (Package_Body), UFUNCBODY (Function_Body), UPROCBODY (Procedure_Body), UPACKINST (Package_Instantiation), UFUNCINST (Function_Instantiation), UPROCINST (Procedure_Instantiation), UPACKREN (Package_Renaming), UFUNCREN (Function_Renaming), UPROCREN (Procedure_Renaming), UGPACKREN (Generic_Package_Renaming), UGFUNCREN (Generic_Function_Renaming), UGPROCREN (Generic_Procedure_Renaming), PACKSUB (Package_Subunit), PROCSUB (Procedure_Subunit), FUNCSUB (Function_Subunit), TASKSUB (Task_Subunit), PROTSUB (Protected_Subunit), PRAGMA (Configuration_Pragma) These values are case-insensitive. "KIND" is treated as specifying a comment; it usually appears in column headers. All of the U kinds are varieties of compilation units; as are the subunits and PRAGMA.
Source_Name
The quoted simple name of the source file.
Start_Line
For a compilation unit, the starting line of the compilation unit. This may include leading whitespace and comments, but must be no later than the first significant text of the unit, and it may not include part of some preceding unit. For other kinds of records, this represents the first line of the range that indicates a trigger for this record. (For instance, for an ERROR record, this represents the first line in the range in which an error must be reported.)
Start_Position

For a compilation unit, the starting position within the Start_Line for the compilation unit. This may include whitespace or comments (always setting this to 1 would be allowed), but must be no later than the first significant character of the line. (The ACATS never puts multiple compilation units on the same line.)
For other kinds of records, the starting position within Start_Line for the trigger for this record. Whether or not positions are used for grading is selectable by an option to the Grading Tool - see 6.1.4. (Use of positions is not required.)
End_Line
For a compilation unit, the end line of the compilation unit. This may include trailing whitespace and comments, but must be no earlier than the last significant text of the unit, and it may not include part of some succeeding unit. For other kinds of records, this represents the last line of the range that indicates a trigger for this record.
End_Position
For a compilation unit, the end position within the Start_Line for the compilation unit. This may include whitespace or comments, but must be no earlier than the last significant character of the line. For other kinds of records, this is the ending position within End_Line for the trigger for this record.
Name_Label
For a compilation unit, the quoted compilation unit name. For a Possible_Error, the quoted set name. For other kinds of records, this value can be omitted other than the separating comma.
Flag
Only used for compilation units; for other kinds of records it can be completely omitted (as it is last, there is no trailing comma). For a compilation unit, it can be omitted (meaning a required, non-main subprogram unit), MAIN (a required, main subprogram unit), OPT (an optional, non-main subprogram unit), or OPTMAIN (an optional, main subprogram unit). An optional unit is one that is not required to be processed (this is indicated by comments within the test). As with kinds, this value is case-insensitive.
These fields do not quite match the components used in the associated Ada record; a few were combined to simplify the file format (at a cost of some additional complexity in reading the records).
The order of records within a test summary file is unimportant to the Grading Tool; it will sort the records appropiately before grading.
The compilation unit start and end information is primarily used to determine to which compilation unit (and thus, which compilation) a particular ERROR or other kind of record belongs. The compilation unit records themselves are secondarily used to ensure that all required units have been processed.
The ranges for ERROR, OK, and other non-compilation unit record kinds are used to determine if an appropriate error is (or is not) present for that record. The limits can be determined by a range indicator (see 6.3.2) if present. Otherwise, the limits will contain at least all of the significant text of the line that contains the tag. (In some cases, these default limits may be expanded.)
The record types used by the Ada implementation of this file can be found in Tst_Sum.A, along with a routine (Write_Summary_Record) used to write a summary record to a test summary file. Note that Write_Summary_Record writes column headers into a new file, so that headers exist if the file is loaded into a spreadsheet or database. It is recommended to use Tst_Sum.A as part of any tool that creates a test summary file (there being little reason to reinvent this wheel).
Code to read a test summary file into an array can be found in Grd_Data.A.
Here is part of a test summary file for Chapter 5 C-Tests:
Kind,Source_Name,Start Line,Start Pos,End Line,End Pos,Name_Label,Flag
UPROCBODY,C51004A.ADA,38,1,261,12,C51004A,MAIN
UPROCBODY,C52005A.ADA,33,1,177,12,C52005A,MAIN
UPROCBODY,C52005B.ADA,33,1,115,12,C52005B,MAIN
UPROCBODY,C52005C.ADA,33,1,79,12,C52005C,MAIN
UPROCBODY,C52005D.ADA,32,1,182,12,C52005D,MAIN
UPROCBODY,C52005E.ADA,32,1,129,12,C52005E,MAIN
UPROCBODY,C52005F.ADA,32,1,86,12,C52005F,MAIN
UPACKSPEC,C540001.A,50,1,53,14,C540001_0,
UPACKSPEC,C540001.A,57,1,73,14,C540001_1,
UPACKBODY,C540001.A,77,1,105,14,C540001_1,
UGENPACK,C540001.A,109,1,121,14,C540001_2,
UPACKBODY,C540001.A,125,1,137,14,C540001_2,
UGENFUNC,C540001.A,141,1,149,69,C540001_3,
UFUNCBODY,C540001.A,153,1,157,14,C540001_3,
UGENPACK,C540001.A,161,1,172,14,C540001_4,
UPACKBODY,C540001.A,176,1,187,14,C540001_4,
UPACKSPEC,C540001.A,191,1,205,14,C540001_5,
UPACKBODY,C540001.A,209,1,222,14,C540001_5,
UPROCBODY,C540001.A,226,1,410,12,C540001,MAIN
UPROCBODY,C540002.A,66,1,235,12,C540002,MAIN
UPACKSPEC,C540003.A,62,1,81,14,C540003_0,
UPROCBODY,C540003.A,83,1,240,12,C540003,MAIN
NAERR,C55B07A.DEP,45,6,45,26,,
UPROCBODY,C55B07A.DEP,41,1,126,14,C55B07A,MAIN
NAERR,C55B07B.DEP,45,6,45,27,,
UPROCBODY,C55B07B.DEP,41,1,126,14,C55B07B,MAIN

Contents   Index   References   Previous   Next