Next: , Up: Creating Unit Tests Using gnattest


26.1 Running gnattest

gnattest has a command-line interface of the form

     
     
     $ gnattest -Pprojname [–harness-dir=dirname] [switches] [filename] [-cargs gcc_switches]

where

-Pprojname
specifies the project defining the location of source files. When no file names are provided on the command line, all sources in the project are used as input. This switch is required.
–harness-dir=dirname
specifies the directory that will hold the harness packages and project file for the test driver. The harness directory should be specified either by that switch or by the corresponding attribute in the project file.
filename
is the name of the source file containing the library unit package declaration for which a test package will be created. The file name may be given with a path.
gcc_switches
is a list of switches for gcc. These switches will be passed on to all compiler invocations made by gnatstub to generate a set of ASIS trees. Here you can provide -I switches to form the source search path, use the -gnatec switch to set the configuration file, use the -gnat05 switch if sources should be compiled in Ada 2005 mode, etc.
switches
is an optional sequence of switches as described in the next section.

gnattest results can be found in two different places.