aboutsummaryrefslogtreecommitdiff
path: root/doc/html/c50.html
blob: c491ba29fcc4fae1ef32d201e3e405f1d75fc662 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML
><HEAD
><TITLE
>Overview</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
REL="HOME"
TITLE="DejaGnu"
HREF="book1.html"><LINK
REL="PREVIOUS"
TITLE="Abstract"
HREF="f40.html"><LINK
REL="NEXT"
TITLE="What's New In This Release"
HREF="x81.html"></HEAD
><BODY
CLASS="CHAPTER"
BGCOLOR="#FFFFFF"
TEXT="#000000"
LINK="#0000FF"
VLINK="#840084"
ALINK="#0000FF"
><DIV
CLASS="NAVHEADER"
><TABLE
SUMMARY="Header navigation 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="f40.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
></TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x81.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="CHAPTER"
><H1
><A
NAME="OVERVIEW"
></A
>Overview</H1
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="WHATIS"
></A
>What is DejaGnu ?</H1
><P
><SPAN
CLASS="PRODUCTNAME"
>DejaGnu</SPAN
> is a framework for
	testing other programs.  Its purpose is to provide a single
	front end for all tests. Think of it as a custom library of
	Tcl procedures crafted to support writing a test harness. A
	<I
CLASS="EMPHASIS"
>Test Harness</I
> is the testing
	infrastructure that is created to support a specific program
	or tool. Each program can have multiple testsuites, all
	supported by a single test harness. DejaGnu is written in
	<SPAN
CLASS="PRODUCTNAME"
>Expect</SPAN
>, which in turn uses
	<SPAN
CLASS="PRODUCTNAME"
>Tcl</SPAN
> -- Tool command
	language. There is more information on Tcl at the <A
HREF="http://www.scriptics.com"
TARGET="_top"
>Scriptics</A
> web site and the
	Expect web site is at <A
HREF="http://expect.nist.gov"
TARGET="_top"
>NIST</A
>.</P
><P
>Julia Menapace first coined the term ``DejaGnu'' to describe
        an earlier testing framework at Cygnus Support she had written
        for <B
CLASS="COMMAND"
>GDB</B
>. When we replaced it with the
        Expect-based framework, it was like DejaGnu all over again.
        More importantly, it was also named after my daughter, <A
HREF="mailto:deja@welcomehome.org"
TARGET="_top"
>Deja Snow Savoye</A
>
        (now 13 years old as of September 2003), who was a toddler
        during DejaGnu's beginnings.</P
><P
>DejaGnu offers several advantages for testing:</P
><P
></P
><UL
COMPACT="COMPACT"
><LI
STYLE="list-style-type: disc"
><P
>The flexibility and consistency of the DejaGnu
	framework make it easy to write tests for any program, with
	either batch oriented, or interactive programs.</P
></LI
><LI
STYLE="list-style-type: disc"
><P
>DejaGnu provides a layer of abstraction which
	allows you to write tests that are portable to any host or
	target where a program must be tested. For instance, a test
	for <B
CLASS="COMMAND"
>GDB</B
> can run from any supported host
	system on any supported target system. DejaGnu runs tests on
	many single board computers, whose operating software ranges
	from a simple boot monitor to a real-time OS.</P
></LI
><LI
STYLE="list-style-type: disc"
><P
>All tests have the same output format. This
	makes it easy to integrate testing into other software
	development processes. DejaGnu's output is designed to be
	parsed by other filtering script and it is also human
	readable.</P
></LI
><LI
STYLE="list-style-type: disc"
><P
>Using Tcl and Expect, it's easy to create wrappers
      for existing testsuites. By incorporating existing tests under
      DejaGnu, it's easier to have a single set of report analyse
      programs..</P
></LI
></UL
><P
>Running tests requires two things: the testing framework and
    the testsuites themselves. Tests are usually written in
    <SPAN
CLASS="PRODUCTNAME"
>Expect</SPAN
> using Tcl, but you can also use
    a Tcl script to run a testsuite that is not based on
    <SPAN
CLASS="PRODUCTNAME"
>Expect</SPAN
>. <SPAN
CLASS="PRODUCTNAME"
>Expect</SPAN
>
    script filenames conventionally use <I
CLASS="EMPHASIS"
>.exp</I
> as a
    suffix; for example, the main implementation of the DejaGnu test
    driver is in the file
    <SPAN
CLASS="PRODUCTNAME"
>runtest.exp</SPAN
>.)</P
></DIV
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="f40.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="book1.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="x81.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Abstract</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
>&nbsp;</TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>What's New In This Release</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>