<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"> <HTML ><HEAD ><TITLE >Special variables used by test cases.</TITLE ><META NAME="GENERATOR" CONTENT="Modular DocBook HTML Stylesheet Version 1.64 "><LINK REL="HOME" TITLE="DejaGnu" HREF="book1.html"><LINK REL="UP" TITLE="Extending DejaGnu" HREF="extending.html"><LINK REL="PREVIOUS" TITLE="Hints On Writing A Test Case" HREF="hints.html"><LINK REL="NEXT" TITLE="Unit Testing" HREF="unit.html"></HEAD ><BODY CLASS="SECT1" BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#840084" ALINK="#0000FF" ><DIV CLASS="NAVHEADER" ><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TH COLSPAN="3" ALIGN="center" >DejaGnu: The GNU Testing Framework</TH ></TR ><TR ><TD WIDTH="10%" ALIGN="left" VALIGN="bottom" ><A HREF="hints.html" ><<< Previous</A ></TD ><TD WIDTH="80%" ALIGN="center" VALIGN="bottom" >Extending DejaGnu</TD ><TD WIDTH="10%" ALIGN="right" VALIGN="bottom" ><A HREF="unit.html" >Next >>></A ></TD ></TR ></TABLE ><HR ALIGN="LEFT" WIDTH="100%"></DIV ><DIV CLASS="SECT1" ><H1 CLASS="SECT1" ><A NAME="TVARIABLES" >Special variables used by test cases.</A ></H1 ><P >There are special variables used by test cases. These contain other information from DejaGnu. Your test cases can use these variables, with conventional meanings (as well as the variables saved in <TT CLASS="FILENAME" >site.exp</TT >. You can use the value of these variables, but they should never be changed.</P ><P ></P ><DIV CLASS="VARIABLELIST" ><DL ><DT >$prms_id</DT ><DD ><P >The tracking system (e.g. GNATS) number identifying a corresponding bugreport. (<I CLASS="EMPHASIS" >0</I >} if you do not specify it in the test script.)</P ></DD ><DT >$item bug_id</DT ><DD ><P >An optional bug id; may reflect a bug identification from another organization. (<I CLASS="EMPHASIS" >0</I > if you do not specify it.)</P ></DD ><DT >$subdir</DT ><DD ><P >The subdirectory for the current test case.</P ></DD ><DT >$expect_out(buffer)</DT ><DD ><P >The output from the last command. This is an internal variable set by Expect. More information can be found in the Expect manual.</P ></DD ><DT >$exec_output</DT ><DD ><P >This is the output from a <TT CLASS="FUNCTION" >${tool}_load</TT > 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.</P ></DD ><DT >$comp_output</DT ><DD ><P >This is the output from a <TT CLASS="FUNCTION" >${tool}_start</TT > command. This is conventionally used for batch oriented programs, like GCC and GAS, that may produce interesting output (warnings, errors) without further interaction.</P ></DD ></DL ></DIV ></DIV ><DIV CLASS="NAVFOOTER" ><HR ALIGN="LEFT" WIDTH="100%"><TABLE WIDTH="100%" BORDER="0" CELLPADDING="0" CELLSPACING="0" ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" ><A HREF="hints.html" ><<< Previous</A ></TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="book1.html" >Home</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" ><A HREF="unit.html" >Next >>></A ></TD ></TR ><TR ><TD WIDTH="33%" ALIGN="left" VALIGN="top" >Hints On Writing A Test Case</TD ><TD WIDTH="34%" ALIGN="center" VALIGN="top" ><A HREF="extending.html" >Up</A ></TD ><TD WIDTH="33%" ALIGN="right" VALIGN="top" >Unit Testing</TD ></TR ></TABLE ></DIV ></BODY ></HTML >