/[dejagnu]/dejagnu/doc/overview/x276.html
ViewVC logotype

Diff of /dejagnu/doc/overview/x276.html

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.1 by rsavoye, Sat Aug 31 05:44:56 2002 UTC revision 1.2 by bje, Sun Aug 17 23:00:07 2003 UTC
# Line 101  WIDTH="100%" Line 101  WIDTH="100%"
101  ><TD  ><TD
102  ><PRE  ><PRE
103  CLASS="PROGRAMLISTING"  CLASS="PROGRAMLISTING"
104  >dgt:~/dejagnu.test$ make check  >dgt:~/dejagnu.test$ make check
105  make check-DEJAGNU  make check-DEJAGNU
106  make[1]: Entering directory `/home/dgt/dejagnu.test' srcdir=`cd . &#38;&#38; pwd`; export srcdir; \  make[1]: Entering directory `/home/dgt/dejagnu.test' srcdir=`cd . &#38;&#38; pwd`; export srcdir; \
107  EXPECT=expect; export EXPECT; \ runtest=runtest; \  EXPECT=expect; export EXPECT; \ runtest=runtest; \
108  if /bin/sh -c "$runtest --version" &#62; /dev/null 2&#62;&#38;1; then \  if /bin/sh -c "$runtest --version" &#62; /dev/null 2&#62;&#38;1; then \
109  $runtest --tool calc CALC=`pwd`/calc --srcdir ./testsuite ; \  $runtest --tool calc CALC=`pwd`/calc --srcdir ./testsuite ; \
110  else echo "WARNING: could not find \`runtest'" 1&#62;&#38;2; :;\  else echo "WARNING: could not find \`runtest'" 1&#62;&#38;2; :;\
111  fi  fi
112  WARNING: Couldn't find the global config file.  WARNING: Couldn't find the global config file.
113  WARNING: Couldn't find tool init file  WARNING: Couldn't find tool init file
114  Test Run By dgt on Sun Nov 25 21:42:21 2001  Test Run By dgt on Sun Nov 25 21:42:21 2001
115  Native configuration is i586-pc-linux-gnu  Native configuration is i586-pc-linux-gnu
116    
117         === calc tests ===         === calc tests ===
118    
119  Schedule of variations:  Schedule of variations:
120     unix     unix
121    
122  Running target unix  Running target unix
123  Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.  Using /usr/share/dejagnu/baseboards/unix.exp as board description file for target.
124  Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.  Using /usr/share/dejagnu/config/unix.exp as generic interface file for target.
125  Using ./testsuite/config/unix.exp as tool-and-target-specific interface file.  Using ./testsuite/config/unix.exp as tool-and-target-specific interface file.
126  Running ./testsuite/calc.test/calc.exp ...  Running ./testsuite/calc.test/calc.exp ...
127  FAIL: multiply2 (bad match)  FAIL: multiply2 (bad match)
128    
129  === calc Summary ===  === calc Summary ===
130    
131  # of expected passes 5  # of expected passes 5
132  # of unexpected failures 1  # of unexpected failures 1
133  /home/Dgt/dejagnu.test/calc version Version: 1.1  /home/Dgt/dejagnu.test/calc version Version: 1.1
134  make[1]: *** [check-DEJAGNU] Fehler 1  make[1]: *** [check-DEJAGNU] Fehler 1
135  make[1]: Leaving directory `/home/Dgt/dejagnu.test' make: *** [check-am] Fehler 2</PRE  make[1]: Leaving directory `/home/Dgt/dejagnu.test' make: *** [check-am] Fehler 2</PRE
136  ></TD  ></TD
137  ></TR  ></TR
# Line 140  make[1]: Leaving directory `/home/Dgt/de Line 140  make[1]: Leaving directory `/home/Dgt/de
140  ><P  ><P
141  >Did you see the  line &#8220;FAIL:&#8220;? The test cases for calc catch the bug in the calc.c file. Fix the error in calc.c later as the following examples assume a unchanged calc.c.</P  >Did you see the  line &#8220;FAIL:&#8220;? The test cases for calc catch the bug in the calc.c file. Fix the error in calc.c later as the following examples assume a unchanged calc.c.</P
142  ><P  ><P
143  >Examine the output files calc.sum and calc.log.  >Examine the output files calc.sum and calc.log.
144  Try to understand the testcases written in ~/dejagnu.test/testsuite/calc.test/calc.exp.  Try to understand the testcases written in ~/dejagnu.test/testsuite/calc.test/calc.exp.
145  To understand Expect you might take a look at the book "Exploring Expect",  To understand Expect you might take a look at the book "Exploring Expect",
146  which is an excellent resource for learning and using Expect. (Pub: O'Reilly, ISBN 1-56592-090-2)  which is an excellent resource for learning and using Expect. (Pub: O'Reilly, ISBN 1-56592-090-2)
147  The book contains hundreds of examples and also includes a tutorial on Tcl.  The book contains hundreds of examples and also includes a tutorial on Tcl.
148  Exploring Expect is 602 pages long. </P  Exploring Expect is 602 pages long. </P
149  ></DIV  ></DIV
150  ><DIV  ><DIV
# Line 170  CLASS="PROGRAMLISTING" Line 170  CLASS="PROGRAMLISTING"
170  ></TR  ></TR
171  ></TABLE  ></TABLE
172  ><P  ><P
173  >Rerun make check. Test whether the output contains "I am ~/.dejagnurc".  >Rerun make check. Test whether the output contains "I am ~/.dejagnurc".
174  Create ~/my_dejagnu.exp and insert the following line:</P  Create ~/my_dejagnu.exp and insert the following line:</P
175  ><TABLE  ><TABLE
176  BORDER="0"  BORDER="0"
# Line 199  CLASS="PROGRAMLISTING" Line 199  CLASS="PROGRAMLISTING"
199  ></TR  ></TR
200  ></TABLE  ></TABLE
201  ><P  ><P
202  >Run &#8220;make check&#8221; again. The output should not contain  >Run &#8220;make check&#8221; again. The output should not contain
203  &#8220;WARNING: Couldn't find the global config file.&#8221;.  &#8220;WARNING: Couldn't find the global config file.&#8221;.
204  Create the sub-directory lib. Create the file &#8220;calc.exp&#8221; in it and insert the following line:</P  Create the sub-directory lib. Create the file &#8220;calc.exp&#8221; in it and insert the following line:</P
205  ><TABLE  ><TABLE
206  BORDER="0"  BORDER="0"
# Line 215  CLASS="PROGRAMLISTING" Line 215  CLASS="PROGRAMLISTING"
215  ></TR  ></TR
216  ></TABLE  ></TABLE
217  ><P  ><P
218  >The last warning &#8220;WARNING: Couldn't find tool init file&#8221;  >The last warning &#8220;WARNING: Couldn't find tool init file&#8221;
219  should not be part of the output of make check.  should not be part of the output of make check.
220  Create the directory &#732;/boards. Create the file &#732;/boards/standard.exp and insert the following line:</P  Create the directory &#732;/boards. Create the file &#732;/boards/standard.exp and insert the following line:</P
221  ><TABLE  ><TABLE
222  BORDER="0"  BORDER="0"
# Line 249  WIDTH="100%" Line 249  WIDTH="100%"
249  ><TD  ><TD
250  ><PRE  ><PRE
251  CLASS="PROGRAMLISTING"  CLASS="PROGRAMLISTING"
252  >dgt:~/dejagnu.test$ make check  >dgt:~/dejagnu.test$ make check
253  &#60;...&#62;  &#60;...&#62;
254  fi  fi
255  I am ~/.dejagnurc  I am ~/.dejagnurc
256  I am ~/my_dejagnu.exp  I am ~/my_dejagnu.exp
257  I am lib/calc.exp  I am lib/calc.exp
258  Test Run By dgt on Sun Nov 25 22:19:14 2001  Test Run By dgt on Sun Nov 25 22:19:14 2001
259  Native configuration is i586-pc-linux-gnu  Native configuration is i586-pc-linux-gnu
260    
261       === calc tests ===       === calc tests ===
262  Using /home/Dgt/boards/standard.exp as standard board description\  Using /home/Dgt/boards/standard.exp as standard board description\
263  file for build.  file for build.
264  I am ~/boards/standard.exp  I am ~/boards/standard.exp
265  Using /home/Dgt/boards/standard.exp as standard board description\  Using /home/Dgt/boards/standard.exp as standard board description\
266   file for host.   file for host.
267  I am ~/boards/standard.exp  I am ~/boards/standard.exp
268    
269  Schedule of variations:  Schedule of variations:
270    unix    unix
271    
272  Running target unix  Running target unix
273  Using /home/Dgt/boards/standard.exp as standard board description\  Using /home/Dgt/boards/standard.exp as standard board description\
274   file for target.   file for target.
275  I am ~/boards/standard.exp  I am ~/boards/standard.exp
276  Using /usr/share/dejagnu/baseboards/unix.exp as board description file\  Using /usr/share/dejagnu/baseboards/unix.exp as board description file\
277  for target.  for target.
278  &#60;...&#62;</PRE  &#60;...&#62;</PRE
279  ></TD  ></TD
280  ></TR  ></TR
# Line 282  for target. Line 282  for target.
282  ></DIV  ></DIV
283  ><P  ><P
284  >It is up to you to decide when and where to use any of the above  >It is up to you to decide when and where to use any of the above
285  mentioned config files for customizing.  mentioned config files for customizing.
286  This chapters showed you where and in which order the different config  This chapters showed you where and in which order the different config
287  files are run.</P  files are run.</P
288  ></DIV  ></DIV
289  ><DIV  ><DIV
# Line 345  NAME="AEN312" Line 345  NAME="AEN312"
345  ></H2  ></H2
346  ><P  ><P
347  >This test checks, whether the built-in shell command &#8220;echo Hello world&#8221;  >This test checks, whether the built-in shell command &#8220;echo Hello world&#8221;
348   will really write &#8220;Hello world&#8221; on the console.   will really write &#8220;Hello world&#8221; on the console.
349  Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp.  Create the file ~/dejagnu.test/testsuite/calc.test/local_echo.exp.
350  It should contain the following lines</P  It should contain the following lines</P
351  ><DIV  ><DIV
352  CLASS="EXAMPLE"  CLASS="EXAMPLE"
# Line 365  WIDTH="100%" Line 365  WIDTH="100%"
365  ><TD  ><TD
366  ><PRE  ><PRE
367  CLASS="PROGRAMLISTING"  CLASS="PROGRAMLISTING"
368  >set test "Local Hello World"  >set test "Local Hello World"
369  send "echo Hello World"  send "echo Hello World"
370  expect {  expect {
371     -re "Hello World"  { pass "$test" }     -re "Hello World"  { pass "$test" }
372  }</PRE  }</PRE
373  ></TD  ></TD
374  ></TR  ></TR
# Line 437  VALIGN="top" Line 437  VALIGN="top"
437  ></DIV  ></DIV
438  ></BODY  ></BODY
439  ></HTML  ></HTML
 >  
440    >

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26