System Testing Script Compiler - atspreproC

The System Testing Script Compiler preprocesses the Test Script and converts it into a native source test harness.

Syntax

atspreproC <test script> <interface_file> {[,<interface_file>]} <file name> [<options>]

where:

Note   If read access to these files is denied, System Testing for C produces a fatal error.

Description

If you do not specify an extension, the system uses the ATS_PTS environment variable extension or the default .pts extension.

If an input file is absent or read access is denied, System Testing for C produces a fatal error.

After execution, the code is generated in the code.c file. If it is not possible to create the file, you will receive a fatal error.

If the Report Generator detects incorrect tests, System Testing for C produces a warning message.

If the report detects a synchronization error between the .tdc and the .rio file, System Testing for C produces a fatal error.

Optional Parameters

Options can be in any order. They may be upper or lowercase and can be abbreviated to their shortest unambiguous number of characters.

 

-ALLOCATION[ =STACK | =DYNAMIC ]

This option allows you to specify the method for allocating the work of the test program in the compiler.

If this option is present, the test program uses only allocated data on the execution stack (=STACK).

By default, the work context is global static data.

 

-BUFSIZE=<size>

This option sets the size of the trace buffer in kilobytes. The trace buffer is only used with the -TRACE option.

The default buffer size is 10KB.

 

-DEFINE=<list of conditions>

This option lets you specify the conditions to apply during test compilation. This option is equivalent to compiler option -D.

You can specify particular conditions or give them a value (-define=condition=value). Symbols defined with this option are equivalent to the following line in C:

#define <symbol> [ <value> ]

 

-FAMILY=<family> {[,<family>]} | -EXFAMILY=<family> {[,<family>]}

-FAMILY specifies the only test families that are to be explicitly executed. Any other test families are ignored.

-EXFAMILY explicitly specifies the families that are to be ignored. All other families are executed.

-FAMILY and -EXFAMILY cannot be used together. The Test Script Compiler generates a warning message if no scenarios are generated.

By default, all test families are executed.

 

-SCN=<scenario> {[,<scenario>]} | -EXSCN=<scenario> {[,<scenario>]}

-SCN specifies the only scenarios that are to be explicitly executed. Any other scenarios are ignored.

-EXSCN explicitely specifies the scenarios that are to be ignored. All other scenarios are executed.

-SCN and -EXSCN cannot be used together.

To specify a sub-scenario, name the set of scenarios in which it is included and separate with full stops. If you exclude a scenario that contains sub-scenarios, all its sub-scenarios are also excluded.

The Test Script Compiler generates a warning message if no scenarios are generated.

 

-FAST | -NOFAST

The -FAST option tells the Test Script Compiler to analyze only those scenarios that you want to generate. This option accelerates execution of the Test Script Compiler if you use a selection option. The option is useful when using -SCN, -EXSCN, -FAMILY, -EXFAMILY.

The -NOFAST option disables this behavior.

By default, the -FAST option is used.

 

-INCL=<directory> {[,<directory>]}

This option lists directories where included files are located. Using this option enables you to:

The system first searches the current directory, next in the directories specified with the -INCL option, and finally the default C system files directory.

 

-LANG=C

This option allows you to select the language of the generated code. You can generate C virtual testers.

By default, virtual testers are generated in C.

 

-LOG | -NOLOG

With the -LOG option, the system displays and stores errors found during the analysis of interface files and test script. The name of the log file is the name of the test script with the .lis extension.

If you select -NOLOG, these errors are not displayed.

By default, the -LOG option is used.

-NOCOMMENT

Use this option to deactivate the processing of COMMENT statements in order to improve performance issues.

 

-NOTSHARED

This option allows you to disable sharing of global static data between instances. When using this option, you must apply different names to all global variables within a test script. No local variable, constant, or function parameter should have the same name as a global static variable in the test script.

This used only by the -ALLOCATION and -THREAD options.

By default global variables of the test script are shared by all instances.

 

-STD_DEFINE=<standard definitions file>

This option provides the C parser with a C source file describing the characteristics of the compiler used.

If the specified file cannot be found, the Test Script Compiler stops and you will receive a fatal error.

By default, no compiler characteristics are specified.

 

-THREAD [ =<function name> ]

This option allows you to create a test function with a name other than main.

If <function name> is omitted, the function name becomes the source file name appended with _start.

By default, the generated function is called main.

 

-TRACE=CIRCULAR | ERROR | SCN | TIME

The Test Script Compiler uses a buffer to store the result of the test script execution. This buffer is saved on disk each time selected events (ERROR, SCN, TIME) occur. This option reduces the size of the virtual tester execution file. It is most useful during an endurance test.

These options generate incomplete reports - some information is filtered - but the report always includes plan test errors.

If the buffer is too small, some traces are lost and the generated report is incomplete. You can change buffer size with the -BUFSIZE option.

 

-STUDIO_LOG

This option is for internal usage only.

 

-SPVGEN

This option is for internal usage only.

Examples

atsprepro gen.pts interface.h code -EXSCN=Main.send.test_1, Main.receive.test_1

 

Return Codes

After execution, the program exits with the following return codes

 

Code

Description

0

End of execution with no errors

3

End of execution with one or more warning messages

5

End of execution with one or more 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.