aboutsummaryrefslogtreecommitdiff
path: root/doc/overview/runtest.html
blob: 574054530a594c4dfd72a544e911c86919ba198e (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
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML
><HEAD
><TITLE
>Runtest</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.64
"><LINK
REL="HOME"
TITLE="DejaGnu"
HREF="book1.html"><LINK
REL="UP"
TITLE="Running Tests"
HREF="runningtests.html"><LINK
REL="PREVIOUS"
TITLE="Running Tests"
HREF="runningtests.html"><LINK
REL="NEXT"
TITLE="The files DejaGnu produces."
HREF="outputfiles.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="runningtests.html"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Running Tests</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="outputfiles.html"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="RUNTEST"
>Runtest</A
></H1
><P
><B
CLASS="COMMAND"
>runtest</B
> is the executable test driver
      for DejaGnu. You can specify two kinds of things on the
      <B
CLASS="COMMAND"
>runtest</B
> command line: command line options,
      and Tcl variables for the test scripts. The options are listed
      alphabetically below.</P
><P
><B
CLASS="COMMAND"
>runtest</B
> returns an exit code of
      <I
CLASS="EMPHASIS"
>1</I
> if any test has an unexpected result; otherwise
      (if all tests pass or fail as expected) it returns <I
CLASS="EMPHASIS"
>0</I
>
      as the exit code.</P
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="OUTPUTS"
>Output States</A
></H2
><P
><TT
CLASS="FILENAME"
>runtest</TT
> flags the outcome of each
	test as one of these cases. <A
HREF="posix.html"
>A POSIX Conforming Test Framework</A
> for a
	discussion of how POSIX specifies the meanings of these
	cases.</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>PASS</DT
><DD
><P
>The most desirable outcome: the test succeeded, and
          was expected to succeed.</P
></DD
><DT
>XPASS</DT
><DD
><P
>A pleasant kind of failure: a test was expected to
          fail, but succeeded. This may indicate progress; inspect the test
          case to determine whether you should amend it to stop expecting
          failure.</P
></DD
><DT
>FAIL</DT
><DD
><P
>A test failed, although it was expected to succeed.
          This may indicate regress; inspect the test case and the failing
          software to ocate the bug.</P
></DD
><DT
>XFAIL</DT
><DD
><P
>A test failed, but it was expected to fail.  This
          result indicates no change in a known bug.  If a test fails because
          the operating system where the test runs lacks some facility required
          by the test, the outcome is <I
CLASS="EMPHASIS"
>UNSUPPORTED</I
>
          instead.</P
></DD
><DT
>UNRESOLVED</DT
><DD
><P
>Output from a test requires manual inspection; the
          test suite could not automatically determine the outcome.  For
          example, your tests can report this outcome is when a test does not
          complete as expected.</P
></DD
><DT
>UNTESTED</DT
><DD
><P
>A test case is not yet complete, and in particular
          cannot yet produce a <I
CLASS="EMPHASIS"
>PASS</I
> or
          <I
CLASS="EMPHASIS"
>FAIL</I
>. You can also use this outcome in dummy
          ``tests'' that note explicitly the absence of a real test case for a
          particular property.</P
></DD
><DT
>UNSUPPORTED</DT
><DD
><P
>A test depends on a conditionally available feature
          that does not exist (in the configured testing environment).  For
          example, you can use this outcome to report on a test case that does
          not work on a particular target because its operating system support
          does not include a required subroutine.</P
></DD
></DL
></DIV
><P
>runtest may also display the following messages:</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
>ERROR</DT
><DD
><P
>Indicates a major problem (detected by the test case
          itself) in running the test. This is usually an unrecoverable error,
          such as a missing file or loss of communication to the target. (POSIX
          test suites should not emit this message; use
          <I
CLASS="EMPHASIS"
>UNSUPPORTED</I
>, <I
CLASS="EMPHASIS"
>UNTESTED</I
>, or
          <I
CLASS="EMPHASIS"
>UNRESOLVED</I
> instead, as
          appropriate.)</P
></DD
><DT
>WARNING</DT
><DD
><P
>Indicates a possible problem in running the
          test. Usually warnings correspond to recoverable errors, or display
          an important message about the following tests.</P
></DD
><DT
>NOTE</DT
><DD
><P
>An informational message about the test
        case.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="INVOKING"
>Invoking Runtest</A
></H2
><P
>This is the full set of command line options that
      <TT
CLASS="FILENAME"
>runtest</TT
> recognizes. Arguments may be
      abbreviated to the shortest unique string.</P
><P
></P
><DIV
CLASS="VARIABLELIST"
><DL
><DT
><TT
CLASS="OPTION"
>--all</TT
> (-a)</DT
><DD
><P
>Display all test output. By default,
	  <I
CLASS="EMPHASIS"
>runtest</I
> shows only the output of tests that
	  produce unexpected results; that is, tests with status
	  <I
CLASS="EMPHASIS"
>FAIL</I
> (unexpected failure),
	  <I
CLASS="EMPHASIS"
>XPASS</I
> (unexpected success), or
	  <I
CLASS="EMPHASIS"
>ERROR</I
> (a severe error in the test case
	  itself). Specify <I
CLASS="EMPHASIS"
>--all</I
> to see output for tests
	  with status <I
CLASS="EMPHASIS"
>PASS</I
> (success, as expected)
	  <I
CLASS="EMPHASIS"
>XFAIL</I
> (failure, as expected), or
	  <I
CLASS="EMPHASIS"
>WARNING</I
> (minor error in the test case
	  itself).</P
></DD
><DT
><TT
CLASS="OPTION"
>--build [string]</TT
></DT
><DD
><P
><I
CLASS="EMPHASIS"
>string</I
> is a full configuration
	  ``triple'' name as used by <B
CLASS="COMMAND"
>configure</B
>. This
	  is the type of machine DejaGnu and the tools to be tested are built
	  on. For a normal cross this is the same as the host, but for a
	  canadian cross, they are seperate.</P
></DD
><DT
><TT
CLASS="OPTION"
>--host [string]</TT
></DT
><DD
><P
><SPAN
CLASS="SYMBOL"
>string</SPAN
> is a full configuration
	  ``triple'' name as used by <I
CLASS="EMPHASIS"
>configure</I
>.  Use this
	  option to override the default string recorded by your
	  configuration's choice of host.  This choice does not change how
	  anything is actually configured unless --build is also specified; it
	  affects <I
CLASS="EMPHASIS"
>only</I
> DejaGnu procedures that compare the
	  host string with particular values.  The procedures
	  <I
CLASS="EMPHASIS"
>ishost</I
>, <I
CLASS="EMPHASIS"
>istarget</I
>,
	  <I
CLASS="EMPHASIS"
>isnative</I
>, and <I
CLASS="EMPHASIS"
>setup</I
>xfail}
	  are affected by <I
CLASS="EMPHASIS"
>--host</I
>. In this usage,
	  <I
CLASS="EMPHASIS"
>host</I
> refers to the machine that the tests are to
	  be run on, which may not be the same as the
	  <I
CLASS="EMPHASIS"
>build</I
> machine. If <I
CLASS="EMPHASIS"
>--build</I
>
	  is also specified, then <I
CLASS="EMPHASIS"
>--host</I
> refers to the
	  machine that the tests wil, be run on, not the machine DejaGnu is run
	  on.</P
></DD
><DT
><TT
CLASS="OPTION"
>--host_board [name]</TT
></DT
><DD
><P
>The host board to use.</P
></DD
><DT
><TT
CLASS="OPTION"
>--target [string]</TT
></DT
><DD
><P
>Use this option to override the default setting
	  (running native tests). <I
CLASS="EMPHASIS"
>string</I
> is a full
	  configuration ``triple'' name of the form
	  <I
CLASS="EMPHASIS"
>cpu-vendor-os</I
> as used by
	  <B
CLASS="COMMAND"
>configure</B
>. This option changes the
	  configuration <I
CLASS="EMPHASIS"
>runtest</I
> uses for the default tool
	  names, and other setup information.</P
></DD
><DT
><TT
CLASS="OPTION"
>--debug</TT
> (-de)</DT
><DD
><P
>Turns on the <I
CLASS="EMPHASIS"
>expect</I
> internal
	  debugging output. Debugging output is displayed as part of the
	  <I
CLASS="EMPHASIS"
>runtest</I
> output, and logged to a file called
	  <TT
CLASS="FILENAME"
>dbg.log</TT
>. The extra debugging output does
	  <I
CLASS="EMPHASIS"
>not</I
> appear on standard output, unless the
	  verbose level is greater than 2 (for instance, to see debug output
	  immediately, specify <I
CLASS="EMPHASIS"
>--debug</I
>-v -v}). The
	  debugging output shows all attempts at matching the test output of
	  the tool with the scripted patterns describing expected output.  The
	  output generated with <I
CLASS="EMPHASIS"
>--strace</I
> also goes into
	  <TT
CLASS="FILENAME"
>dbg.log</TT
>.</P
></DD
><DT
><TT
CLASS="OPTION"
>--help</TT
> (-he)</DT
><DD
><P
>Prints out a short summary of the
	  <I
CLASS="EMPHASIS"
>runtest</I
> options, then exits (even if you also
	  specify other options).</P
></DD
><DT
><TT
CLASS="OPTION"
>--ignore [name(s)] </TT
></DT
><DD
><P
>The names of specific tests to
	  ignore.</P
></DD
><DT
><TT
CLASS="OPTION"
>--objdir [path]</TT
></DT
><DD
><P
>Use <I
CLASS="EMPHASIS"
>path</I
> as the top directory
	  containing any auxiliary compiled test code. This defaults to
	  <TT
CLASS="FILENAME"
>.</TT
>.  Use this option to locate pre-compiled test
	  code.  You can normally prepare any auxiliary files needed with
	  <I
CLASS="EMPHASIS"
>make</I
>.</P
></DD
><DT
><TT
CLASS="OPTION"
>--outdir [path]</TT
></DT
><DD
><P
>Write output logs in directory
	  <TT
CLASS="FILENAME"
>path</TT
>.  The default is <I
CLASS="EMPHASIS"
>.},
	  the</I
> directory where you start
	  <I
CLASS="EMPHASIS"
>runtest</I
>. This option affects only the summary
	  and the detailed log files
	  <TT
CLASS="FILENAME"
>tool.sum</TT
> and
	  <TT
CLASS="FILENAME"
>tool.log</TT
>. The DejaGnu debug
	  log <TT
CLASS="FILENAME"
>dbg.log</TT
> always appears (when requested) in
	  the local directory.</P
></DD
><DT
><TT
CLASS="OPTION"
>--reboot [name]</TT
></DT
><DD
><P
>Reboot the target board when
	  <I
CLASS="EMPHASIS"
>runtest</I
> initializes. Usually, when running tests
	  on a separate target board, it is safer to reboot the target to be
	  certain of its state.  However, when developing test scripts,
	  rebooting takes a lot of time.</P
></DD
><DT
><TT
CLASS="OPTION"
>--srcdir [path]</TT
></DT
><DD
><P
>Use <TT
CLASS="FILENAME"
>path</TT
> as the top directory
	  for test scripts to run. <I
CLASS="EMPHASIS"
>runtest</I
> looks in this
	  directory for any subdirectory whose name begins with the toolname
	  (specified with <I
CLASS="EMPHASIS"
>--tool</I
>). For instance, with
	  <I
CLASS="EMPHASIS"
>--tool</I
>gdb}, <I
CLASS="EMPHASIS"
>runtest</I
> uses
	  tests in subdirectories <TT
CLASS="FILENAME"
>gdb.*</TT
> (with the usual
	  shell-like filename expansion).  If you do not use
	  <I
CLASS="EMPHASIS"
>--srcdir</I
>, <I
CLASS="EMPHASIS"
>runtest</I
> looks for
	  test directories under the current working
	  directory.</P
></DD
><DT
><TT
CLASS="OPTION"
>--strace [number]</TT
></DT
><DD
><P
>Turn on internal tracing for
	  <I
CLASS="EMPHASIS"
>expect</I
>, to n levels deep. By adjusting the
	  level, you can control the extent to which your output expands
	  multi-level Tcl statements.  This allows you to ignore some levels of
	  <I
CLASS="EMPHASIS"
>case</I
> or <I
CLASS="EMPHASIS"
>if</I
> statements.
	  Each procedure call or control structure counts as one ``level''. The
	  output is recorded in the same file, <TT
CLASS="FILENAME"
>dbg.log</TT
>,
	  used for output from <I
CLASS="EMPHASIS"
>--debug</I
>.</P
></DD
><DT
><TT
CLASS="OPTION"
>--connect [program]</TT
></DT
><DD
><P
>Connect to a target testing environment as specified
	  by <I
CLASS="EMPHASIS"
>type</I
>, if the target is not the computer
	  running <I
CLASS="EMPHASIS"
>runtest</I
>.  For example, use
	  <I
CLASS="EMPHASIS"
>--connect</I
> to change the program used to connect
	  to a ``bare board'' boot monitor.  The choices for
	  <I
CLASS="EMPHASIS"
>type</I
> in the DejaGnu 1.4 distribution are
	  <I
CLASS="EMPHASIS"
>rlogin</I
>, <I
CLASS="EMPHASIS"
>telnet</I
>,
	  <I
CLASS="EMPHASIS"
>rsh</I
>, <I
CLASS="EMPHASIS"
>tip</I
>,
	  <I
CLASS="EMPHASIS"
>kermit</I
>, and <I
CLASS="EMPHASIS"
>mondfe</I
>.</P
><P
>The default for this option depends on the configuration most
	  convenient communication method available, but often other
	  alternatives work as well; you may find it useful to try alternative
	  connect methods if you suspect a communication problem with your
	  testing target.</P
></DD
><DT
><TT
CLASS="OPTION"
>--baud [number]</TT
></DT
><DD
><P
>Set the default baud rate to something other than
	  9600. (Some serial interface programs, like <I
CLASS="EMPHASIS"
>tip</I
>,
	  use a separate initialization file instead of this
	  value.)</P
></DD
><DT
><TT
CLASS="OPTION"
>--target_board [name(s)]</TT
></DT
><DD
><P
>The list of target boards to run tests
	  on.</P
></DD
><DT
><A
NAME="TOOL-OPT"
><TT
CLASS="OPTION"
>--tool[name(s)]</TT
></A
></DT
><DD
><P
>Specifies which test suite to run, and what
	  initialization module to use. <TT
CLASS="OPTION"
>--tool</TT
> is used
	  <I
CLASS="EMPHASIS"
>only</I
> for these two purposes. It is
	  <I
CLASS="EMPHASIS"
>not</I
> used to name the executable program to
	  test. Executable tool names (and paths) are recorded in
	  <TT
CLASS="FILENAME"
>site.exp</TT
> and you can override them by specifying
	  Tcl variables on the command line.</P
><P
>For example, including "<TT
CLASS="OPTION"
>--tool</TT
> gcc" on the
	  <I
CLASS="EMPHASIS"
>runtest</I
> command line runs tests from all test
	  subdirectories whose names match <TT
CLASS="FILENAME"
>gcc.*</TT
>, and uses
	  one of the initialization modules named
	  <TT
CLASS="FILENAME"
>config/*-gcc.exp</TT
>. To specify the name of the
	  compiler (perhaps as an alternative path to what
	  <I
CLASS="EMPHASIS"
>runtest</I
> would use by default), use
	  <I
CLASS="EMPHASIS"
>GCC=binname</I
> on the <I
CLASS="EMPHASIS"
>runtest</I
>
	  command line.</P
></DD
><DT
><TT
CLASS="OPTION"
>--tool_exec [name]</TT
></DT
><DD
><P
>The path to the tool executable to
	  test.</P
></DD
><DT
><TT
CLASS="OPTION"
>--tool_opts [options]</TT
></DT
><DD
><P
>A list of additional options to pass to the
	  tool.</P
></DD
><DT
><TT
CLASS="OPTION"
>--verbose</TT
> (-v)</DT
><DD
><P
>Turns on more output. Repeating this option increases
          the amount of output displayed. Level one (<I
CLASS="EMPHASIS"
>-v</I
>)
          is simply test output. Level two (<I
CLASS="EMPHASIS"
>-v</I
>-v}) shows
          messages on options, configuration, and process control.  Verbose
          messages appear in the detailed (<TT
CLASS="FILENAME"
>*.log</TT
>) log
          file, but not in the summary (<TT
CLASS="FILENAME"
>*.sum</TT
>) log
          file.</P
></DD
><DT
><TT
CLASS="OPTION"
>--version</TT
> (-V)</DT
><DD
><P
>Prints out the version numbers of DejaGnu,
	  <I
CLASS="EMPHASIS"
>expect</I
> and Tcl, and exits without running any
	  tests.</P
></DD
><DT
><TT
CLASS="OPTION"
>--D[0-1]</TT
></DT
><DD
><P
>Start the internal Tcl debugger. The Tcl debugger
	  supports breakpoints, single stepping, and other common debugging
	  activities. See the document "Debugger for Tcl Applications" by Don
	  Libes. (Distributed in PostScript form with
	  <I
CLASS="EMPHASIS"
>expect</I
> as the file
	  <TT
CLASS="FILENAME"
>expect/tcl-debug.ps.</TT
>. If you specify
	  <I
CLASS="EMPHASIS"
>-D1</I
>, the <I
CLASS="EMPHASIS"
>expect</I
> shell stops
	  at a breakpoint as soon as DejaGnu invokes it. If you specify
	  <I
CLASS="EMPHASIS"
>-D0</I
>, DejaGnu starts as usual, but you can enter
	  the debugger by sending an interrupt (e.g. by typing
	  <B
CLASS="KEYCAP"
>C</B
>-<B
CLASS="KEYCAP"
>c</B
>).
	  </P
></DD
><DT
><TT
CLASS="FILENAME"
>testfile</TT
>.exp[=arg(s)]</DT
><DD
><P
>Specify the names of testsuites to run. By default,
	  <I
CLASS="EMPHASIS"
>runtest</I
> runs all tests for the tool, but you can
	  restrict it to particular testsuites by giving the names of the
	  <I
CLASS="EMPHASIS"
>.exp expect</I
> scripts that control
	  them. <I
CLASS="EMPHASIS"
>testsuite</I
>.exp may not include path
	  information; use plain filenames.</P
></DD
><DT
><TT
CLASS="FILENAME"
>testfile</TT
>.exp="testfile1 ..."</DT
><DD
><P
>Specify a subset of tests in a suite to run. For
	  compiler or assembler tests, which often use a single
	  <I
CLASS="EMPHASIS"
>.exp</I
> script covering many different source
	  files, this option allows you to further restrict the tests by
	  listing particular source files to compile. Some tools even support
	  wildcards here.  The wildcards supported depend upon the tool, but
	  typically they are <I
CLASS="EMPHASIS"
>?</I
>, <I
CLASS="EMPHASIS"
>*</I
>,
	  and <I
CLASS="EMPHASIS"
>[chars]</I
>.</P
></DD
><DT
><SPAN
CLASS="SYMBOL"
>tclvar</SPAN
>=value</DT
><DD
><P
>You can define Tcl variables for use by your test
	  scripts in the same style used with <I
CLASS="EMPHASIS"
>make</I
> for
	  environment variables.  For example, <I
CLASS="EMPHASIS"
>runtest
	  GDB=gdb.old</I
> defines a variable called
	  <B
CLASS="COMMAND"
>GDB</B
>; when your scripts refer to
	  <SPAN
CLASS="SYMBOL"
>$GDB</SPAN
> in this run, they use the value
	  <I
CLASS="EMPHASIS"
>gdb.old</I
>.</P
><P
>The default Tcl variables used for most tools are defined in
	  the main DejaGnu <I
CLASS="EMPHASIS"
>Makefile</I
>; their values are
	  captured in the <TT
CLASS="FILENAME"
>site.exp</TT
> file.</P
></DD
></DL
></DIV
></DIV
><DIV
CLASS="SECT2"
><H2
CLASS="SECT2"
><A
NAME="COMMON"
>Common Options</A
></H2
><P
>Typically, you don't need must to use any command-line options.
	<TT
CLASS="OPTION"
>--tool</TT
> used is only required when there are more than
	one test suite in the same directory. The default options are in the
	local site.exp file, created by "make site.exp".</P
><P
>For example, if the directory <TT
CLASS="FILENAME"
>gdb/testsuite</TT
>
	contains a collection of DejaGnu tests for GDB, you can run them like
	this:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
>	  eg$ cd gdb/testsuite
	  eg$ runtest --tool gdb
	</PRE
></TD
></TR
></TABLE
><P
>Test output follows, ending with:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
>		=== gdb Summary ===

		# of expected passes 508
		# of expected failures 103
		/usr/latest/bin/gdb version 4.14.4 -nx
	</PRE
></TD
></TR
></TABLE
><P
>You can use the option <I
CLASS="EMPHASIS"
>--srcdir</I
> to point to
	some other directory containing a collection of tests:</P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
>	  eg$ runtest--srcdir /devo/gdb/testsuite
	</PRE
></TD
></TR
></TABLE
><P
>By default, <B
CLASS="COMMAND"
>runtest</B
> prints only the
	names of the tests it runs, output from any tests that have unexpected
	results, and a summary showing how many tests passed and how many
	failed.  To display output from all tests (whether or not they behave
	as expected), use the <I
CLASS="EMPHASIS"
>--all</I
> option.  For more
	verbose output about processes being run, communication, and so on, use
	<I
CLASS="EMPHASIS"
>--verbose</I
>. To see even more output, use multiple
	<I
CLASS="EMPHASIS"
>--verbose</I
> options. for a more detailed explanation
	of each <B
CLASS="COMMAND"
>runtest</B
> option.</P
><P
>Test output goes into two files in your current directory:
	summary output in <TT
CLASS="FILENAME"
>tool.sum</TT
>,
	and detailed output in <TT
CLASS="FILENAME"
>	tool.log</TT
>. (<I
CLASS="EMPHASIS"
>tool</I
>
	refers to the collection of tests; for example, after a run with
	<I
CLASS="EMPHASIS"
>--tool</I
> gdb, look for output files
	<TT
CLASS="FILENAME"
>gdb.sum</TT
> and
	<TT
CLASS="FILENAME"
>gdb.log</TT
>.)</P
></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="runningtests.html"
>&#60;&#60;&#60; 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="outputfiles.html"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Running Tests</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="runningtests.html"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>The files DejaGnu produces.</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>