Previous: , Up: Extending DejaGnu  


4.9 Test case special variables

There are special variables that contain other information from DejaGnu. Your test cases can inspect these variables, as well as the variables saved in site.exp. These variables should never be changed.

$prms_id

The bug tracking system (eg. PRMS/GNATS) number identifying a corresponding bug report (0 if you do not specify it).

$bug_id

An optional bug ID, perhaps a bug identification number from another organization (0 if you do not specify it).

$subdir

The subdirectory for the current test case.

$exec_output

This is the output from a ${tool}_load command. This only applies to tools like GCC and GAS which produce an object file that must in turn be executed to complete a test.

$comp_output

This is the output from a ${tool}_start command. This is conventionally used for batch-oriented programs, like GCC and GAS, that may produce interesting output (warnings, errors) without further interaction.

$expect_out(buffer)

The output from the last command. This is an internal variable set by Expect. More information can be found in the Expect manual.