4 >Adding A Test Case To A Test Suite.
</TITLE
7 CONTENT=
"Modular DocBook HTML Stylesheet Version 1.44"><LINK
10 HREF=
"book1.html"><LINK
12 TITLE=
"Extending DejaGnu"
13 HREF=
"extending.html"><LINK
15 TITLE=
"Debugging A Test Case"
16 HREF=
"debugging.html"><LINK
18 TITLE=
"Hints On Writing A Test Case"
19 HREF=
"hints.html"></HEAD
32 >DejaGnu: The GNU Testing Framework
</TH
47 >Chapter
4. Extending DejaGnu
</TD
67 >Adding A Test Case To A Test Suite.
</A
70 >There are two slightly different ways to add a test
71 case. One is to add the test case to an existing directory. The
72 other is to create a new directory to hold your test. The
73 existing test directories represent several styles of testing,
74 all of which are slightly different; examine the directories for
75 the tool of interest to see which (if any) is most suitable.
</P
77 >Adding a GCC test can be very simple: just add the C code
78 to any directory beginning with
<TT
82 runs on the next
<TABLE
89 CLASS=
"PROGRAMLISTING"
97 >To add a test to GDB, first add any source code you will
98 need to the test directory. Then you can either create a new
99 expect file, or add your test to an existing one (any
103 > suffix). Creating a new
104 .exp file is probably a better idea if the test is significantly
105 different from existing tests. Adding it as a separate file also
106 makes upgrading easier. If the C code has to be already compiled
107 before the test will run, then you'll have to add it to the
111 > file for that test directory,
121 >Adding a test by creating a new directory is very
127 STYLE=
"list-style-type: disc"
129 >Create the new directory. All subdirectory names
130 begin with the name of the tool to test; e.g. G++ tests might be
131 in a directory called
<TT
135 be multiple test directories that start with the same tool name
142 STYLE=
"list-style-type: disc"
144 >Add the new directory name to the
152 > file for the test suite
153 directory. This way when
<B
160 > next run, they include the new
164 STYLE=
"list-style-type: disc"
166 >Add the new test case to the directory, as
170 STYLE=
"list-style-type: disc"
172 >To add support in the new directory for
173 configure and make, you must also create a
200 HREF=
"debugging.html"
225 >Debugging A Test Case
</TD
231 HREF=
"extending.html"
238 >Hints On Writing A Test Case
</TD