1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
5
>Builtin Procedures</TITLE
8
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
12
HREF="book1.html"><LINK
15
HREF="c1593.html"><LINK
18
HREF="x1600.html"><LINK
21
HREF="x5058.html"></HEAD
32
SUMMARY="Header navigation table"
41
>DejaGnu: The GNU Testing Framework</TH
51
><<< Previous</A
65
>Next >>></A
79
>Builtin Procedures</H1
81
>DejaGnu provides these Tcl procedures.</P
89
>Core Internal Procedures</H2
97
>Mail_file Procedure</H3
145
>Open_logs Procedure</H3
177
>Close_logs Procedure</H3
209
>Isbuild Procedure</H3
211
>Tests for a particular build host environment. If the
212
currently configured host matches the argument string, the result is
216
>; otherwise the result is
224
three-part configure host name; in particular, you may not use the
225
shorter nicknames supported by configure (but you can use wildcard
226
characters, using shell syntax, to specify sets of names). If it is
227
passed a NULL string, then it returns the name of the build canonical
276
>Is_remote Procedure</H3
326
>is3way Procedure</H3
328
>Tests for a canadian cross. This is when the tests will be run
329
on a remotly hosted cross compiler. If it is a canadian cross, then
333
>; otherwise the result is
367
>Ishost Procedure</H3
369
>Tests for a particular host environment. If the currently
370
configured host matches the argument string, the result is
374
>; otherwise the result is
382
three-part configure host name; in particular, you may not use the
383
shorter nicknames supported by configure (but you can use wildcard
384
characters, using shell syntax, to specify sets of names).</P
432
>Istarget Procedure</H3
434
>Tests for a particular target environment. If the currently
435
configured target matches the argument string, the result is
439
> ; otherwise the result is
443
>. target must be a full three-part configure
444
target name; in particular, you may not use the shorter nicknames
445
supported by configure (but you can use wildcard characters, using
446
shell syntax, to specify sets of names). If it is passed a
450
> string, then it returns the name of the
451
build canonical configuration.</P
499
>Isnative Procedure</H3
501
>Tests whether the current configuration has the same host and
502
target. When it runs in a native configuration this procedure returns
506
>; otherwise it returns a
540
>Unknown Procedure</H3
590
>Clone_output Procedure</H3
640
>Reset_vars Procedure</H3
672
>Log_and_exit Procedure</H3
704
>Log_summary Procedure</H3
754
>Cleanup Procedure</H3
786
>Setup_xfail Procedure</H3
788
>Declares that the test is expected to fail on a particular set
789
of configurations. The config argument must be a list of full
790
three-part configure target name; in particular, you may not use the
791
shorter nicknames supported by configure (but you can use the common
792
shell wildcard characters to specify sets of names). The
796
> argument is optional, and used only in the
797
logging file output; use it as a link to a bug-tracking system such
814
produce the messages <I
821
> respectively, allowing you to distinguish
822
expected failures (and unexpected success!) from other test
838
SRC="./stylesheet-images/warning.gif"
845
>Warning you must clear the expected failure after
846
using setup_xfail in a test case. Any call to <TT
853
>l clears the expected failure
854
implicitly; if the test has some other outcome, e.g. an error, you
858
> to clear the expected
859
failure explicitly. Otherwise, the expected-failure declaration
860
applies to whatever test runs next, leading to surprising
907
>The config triplet to trigger whether this is an
908
unexpected or expect failure.</P
919
>The optional bugid, used to tie it this test case
920
to a bug tracking system.</P
932
>Record_test Procedure</H3
1018
>Declares a test to have passed. <TT
1022
writes in the log files a message beginning with
1030
was expected), appending the argument
1038
CLASS="FUNCSYNOPSIS"
1061
CLASS="VARIABLELIST"
1072
>The string to use for this PASS
1087
>Declares a test to have failed. <TT
1091
writes in the log files a message beginning with
1099
was expected), appending the argument
1107
CLASS="FUNCSYNOPSIS"
1130
CLASS="VARIABLELIST"
1141
>The string to use for this FAIL
1154
>Xpass Procedure</H3
1156
>Declares a test to have unexpectably passed, when it was
1157
expected to be a failure. <TT
1161
writes in the log files a message beginning with
1169
was expected), appending the argument
1177
CLASS="FUNCSYNOPSIS"
1200
CLASS="VARIABLELIST"
1211
>The string to use for this output
1224
>Xfail Procedure</H3
1226
>Declares a test to have expectably
1231
writes in the log files a message beginning with
1239
was expected), appending the argument
1247
CLASS="FUNCSYNOPSIS"
1270
CLASS="VARIABLELIST"
1281
>The string to use for this output
1292
NAME="SETWARNINGTHRESHOLD"
1294
>Set_warning_threshold Procedure</H3
1296
>Sets the value of <SPAN
1298
>warning_threshold</SPAN
1303
> disables it: calls to
1320
CLASS="FUNCSYNOPSIS"
1330
>set_warning_threshold</TT
1343
CLASS="VARIABLELIST"
1354
>This is the value of the new warning
1365
NAME="GETWARNINGTHRESHOLD"
1367
>Get_warning_threshold Procedure</H3
1369
>Returns the current value of
1372
>{warning_threshold</SPAN
1373
>. The default value is 3. This
1374
value controls how many <TT
1378
be called before becoming <I
1383
CLASS="FUNCSYNOPSIS"
1393
>get_warning_threshold</TT
1411
>Warning Procedure</H3
1413
>Declares detection of a minor error in the test case
1417
> writes in the log files a message
1421
>, appending the argument
1434
> for cases (such as communication
1435
failure to be followed by a retry) where the test case can recover from
1436
the error. If the optional <TT
1442
then this is used to set the internal count of warnings to that
1445
>As a side effect, <SPAN
1447
>warning_threshold</SPAN
1449
calls to warning in a single test case also changes the effect of the
1457
the test outcome becomes <I
1468
not be trustworthy after many warnings. If the optional numeric value
1472
>, then there are no further side effects to
1473
calling this function, and the following test outcome doesn't become
1477
>. This can be used for errors with no
1478
known side effects.</P
1480
CLASS="FUNCSYNOPSIS"
1510
CLASS="VARIABLELIST"
1532
>The optional number to set the error counter. Thius
1533
is only used to fake out the counter when using the
1537
> procedure to control when it flips the
1554
>Perror Procedure</H3
1556
>Declares a severe error in the testing framework
1560
> writes in the log files a message
1564
>, appending the argument
1572
>As a side effect, perror also changes the effect of the next
1580
test outcome becomes <I
1591
be trusted after a severe error in the test framework. If the optional
1595
>, then there are no further side
1596
effects to calling this function, and the following test outcome
1600
>. This can be used for
1601
errors with no known side effects.</P
1603
CLASS="FUNCSYNOPSIS"
1633
CLASS="VARIABLELIST"
1655
>The optional number to set the error counter. Thius
1656
is only used to fake out the counter when using the
1660
> procedure to control when it flips the
1679
>Appends an informational message to the log
1683
> writes in the log files a message
1687
>, appending the argument
1700
> should be used for most
1701
such messages, but in cases where a message is needed in the log file
1702
regardless of the verbosity level use <TT
1707
CLASS="FUNCSYNOPSIS"
1730
CLASS="VARIABLELIST"
1741
>The string to use for this note.</P
1753
>Untested Procedure</H3
1755
>Declares a test was not run. <TT
1759
in the log file a message beginning with <I
1763
appending the argument <I
1767
might use this in a dummy test whose only role is to record that a test
1768
does not yet exist for some feature.</P
1770
CLASS="FUNCSYNOPSIS"
1793
CLASS="VARIABLELIST"
1804
>The string to use for this output
1817
>Unresolved Procedure</H3
1819
>Declares a test to have an unresolved
1823
> writes in the log file a
1824
message beginning with <I
1831
>. This usually means the test did
1832
not execute as expected, and a human being must go over results to
1833
determine if it passed or failed (and to improve the test case).</P
1835
CLASS="FUNCSYNOPSIS"
1858
CLASS="VARIABLELIST"
1869
>The string to use for this output
1882
>Unsupported Procedure</H3
1884
>Declares that a test case depends on some facility that does not
1885
exist in the testing environment. <TT
1889
writes in the log file a message beginning with
1893
>, appending the argument string.</P
1895
CLASS="FUNCSYNOPSIS"
1918
CLASS="VARIABLELIST"
1929
>The string to use for this output
1940
NAME="INITTESTCOUNTS"
1942
>Init_testcounts Procedure</H3
1946
CLASS="FUNCSYNOPSIS"
1956
>init_testcounts</TT
1974
>Incr_count Procedure</H3
1978
CLASS="FUNCSYNOPSIS"
2007
CLASS="VARIABLELIST"
2041
>transform Procedure</H3
2043
>Generates a string for the name of a tool as it was configured
2044
and installed, given its native name (as the argument
2050
>). This makes the assumption that all
2051
tools are installed using the same naming conventions: For example,
2052
for a cross compiler supporting the <I
2056
configuration, the result of transform <B
2062
>m68k-vxworks-gcc</B
2065
CLASS="FUNCSYNOPSIS"
2088
CLASS="VARIABLELIST"
2099
>The name of the cross-development program to
2110
NAME="CHECKCONDITIONALXFAIL"
2112
>Check_conditional_xfail Procedure</H3
2114
>This procedure adds a conditional xfail, based on compiler
2115
options used to create a test case executable. If an include options
2116
is found in the compiler flags, and it's the right architecture,
2120
>. Otherwise it'll produce
2124
>. You can also specify flags to
2125
exclude. This makes a result be a <I
2129
the included options are found. To set the conditional, set
2132
>compiler_conditional_xfail_data</SPAN
2141
CLASS="PROGRAMLISTING"
2142
>"[message string] [targets list] [includes
2143
list] [excludes list]"</PRE
2147
> (descriptions below). This is
2148
the checked at pass/fail decision time, so there is no need to call
2149
the procedure yourself, unless you wish to know if it gets
2150
triggered. After a pass/fail, the variable is reset, so it doesn't
2151
effect other tests. It returns <I
2155
conditional is true, or <I
2158
> if the conditional is
2161
CLASS="FUNCSYNOPSIS"
2171
>check_conditional_xfail</TT
2202
CLASS="VARIABLELIST"
2213
>This is the message to print with the normal test
2225
>This is a string with the list targets to activate
2226
this conditional on.</P
2237
>This is a list of sets of options to search for in
2238
the compiler options to activate this conditional. If the list of
2239
sets of options is empty or if any set of the options matches,
2240
then this conditional is true. (It may be useful to specify an
2241
empty list of include sets if the conditional is always true
2242
unless one of the exclude sets matches.)</P
2253
>This is a list of sets of options to search for in
2254
the compiler options to activate this conditional. If any set of
2255
the options matches, (regardless of whether any of the include sets
2256
match) then this conditional is de-activated.</P
2267
>Example 1. Specifying the conditional xfail data</B
2276
CLASS="PROGRAMLISTING"
2277
> set compiler_conditional_xfail_data { \
2278
"I sure wish I knew why this was hosed" \
2279
"sparc*-sun*-* *-pc-*-*" \
2280
{"-Wall -v" "-O3"} \
2289
>What this does is it matches only for these two targets if
2290
"-Wall -v" or "-O3" is set, but neither "-O1" or "-Map" is set. For
2291
a set to match, the options specified are searched for independantly
2292
of each other, so a "-Wall -v" matches either "-Wall -v" or "-v
2293
-Wall". A space seperates the options in the string. Glob-style
2294
regular expressions are also permitted.</P
2303
>Clear_xfail Procedure</H3
2305
>Cancel an expected failure (previously declared with
2309
>) for a particular set of
2310
configurations. The <TT
2315
> argument is a list
2316
of configuration target names. It is only necessary to call
2320
> if a test case ends without calling
2333
CLASS="FUNCSYNOPSIS"
2356
CLASS="VARIABLELIST"
2367
>The configuration triplets to
2380
>Verbose Procedure</H3
2382
>Test cases can use this function to issue helpful messages
2383
depending on the number of <TT
2387
runtest command line. It prints string if the value of the variable
2391
> is higher than or equal to the optional
2392
number. The default value for number is <I
2399
> argument to cause string to always
2400
be added to the log file, even if it won't be printed. Use the
2404
> argument to log the test results into
2405
a parsable XML file. Use the optional <TT
2409
to print string without a trailing newline. Use the optional
2413
> argument if string begins with "-".</P
2415
CLASS="FUNCSYNOPSIS"
2468
CLASS="VARIABLELIST"
2546
>Load_lib Procedure</H3
2548
>Loads a DejaGnu library file by searching a fixed path built
2549
into DejaGnu. If DejaGnu has been installed, it looks in a path
2550
starting with the installed library directory. If you are running
2551
DejaGnu directly from a source directory, without first running
2555
>, this path defaults to the current
2556
directory. In either case, it then looks in the current directory
2557
for a directory called <TT
2561
duplicate definitions, the last one loaded takes precedence over the
2564
CLASS="FUNCSYNOPSIS"
2587
CLASS="VARIABLELIST"
2598
>The name of the DejaGnu library file to
2612
>Procedures For Remote Communication</H2
2618
functions, for establishing and managing communications. Each
2619
of these procedures tries to establish the connection up to
2620
three times before returning. Warnings (if retries will
2621
continue) or errors (if the attempt is abandoned) report on
2622
communication failures. The result for any of these
2623
procedures is either <I
2627
connection cannot be established, or the spawn ID returned by
2637
>It use the value of the <SPAN
2648
> as the type of connection to
2649
make. Current supported connection types are tip, kermit,
2650
telnet, rsh, rlogin, and netdata. If the <TT
2654
option was used on the runtest command line, then the target
2655
is rebooted before the connection is made.</P
2663
>Call_remote Procedure</H3
2667
CLASS="FUNCSYNOPSIS"
2708
CLASS="VARIABLELIST"
2751
NAME="CHECKFORBOARDSTATUS"
2753
>Check_for_board_status Procedure</H3
2757
CLASS="FUNCSYNOPSIS"
2767
>check_for_board_status</TT
2780
CLASS="VARIABLELIST"
2803
>File_on_build Procedure</H3
2807
CLASS="FUNCSYNOPSIS"
2842
CLASS="VARIABLELIST"
2887
>File_on_host Procedure</H3
2891
CLASS="FUNCSYNOPSIS"
2926
CLASS="VARIABLELIST"
2971
>Local_exec Procedure</H3
2975
CLASS="FUNCSYNOPSIS"
3016
CLASS="VARIABLELIST"
3061
>Remote_binary Procedure</H3
3065
CLASS="FUNCSYNOPSIS"
3088
CLASS="VARIABLELIST"
3111
>Remote_close Procedure</H3
3115
CLASS="FUNCSYNOPSIS"
3138
CLASS="VARIABLELIST"
3149
>This is the value returned by a call
3154
connection to the target so resources can be used by
3155
others. This parameter can be left off if the
3173
NAME="REMOTEDOWNLOAD"
3175
>Remote_download Procedure</H3
3179
CLASS="FUNCSYNOPSIS"
3189
>remote_download</TT
3214
CLASS="VARIABLELIST"
3259
>Remote_exec Procedure</H3
3263
CLASS="FUNCSYNOPSIS"
3298
CLASS="VARIABLELIST"
3343
>Remote_expect Procedure</H3
3347
CLASS="FUNCSYNOPSIS"
3382
CLASS="VARIABLELIST"
3427
>Remote_file Procedure</H3
3431
CLASS="FUNCSYNOPSIS"
3460
CLASS="VARIABLELIST"
3494
>Remote_ld Procedure</H3
3498
CLASS="FUNCSYNOPSIS"
3527
CLASS="VARIABLELIST"
3561
>Remote_load Procedure</H3
3565
CLASS="FUNCSYNOPSIS"
3600
CLASS="VARIABLELIST"
3645
>Remote_open Procedure</H3
3649
CLASS="FUNCSYNOPSIS"
3672
CLASS="VARIABLELIST"
3690
>. Host or target refers to
3691
whether it is a connection to a remote target, or a
3692
remote host. This opens the connection to the desired
3693
target or host using the default values in the
3694
configuration system. It returns that
3698
> of the process that manages
3699
the connection. This value can be used in
3707
> statements, or passed to
3708
other procedures that need the connection process's
3709
id. This also sets the <SPAN
3726
NAME="REMOTEPOPCONN"
3728
>Remote_pop_conn Procedure</H3
3732
CLASS="FUNCSYNOPSIS"
3742
>remote_pop_conn</TT
3755
CLASS="VARIABLELIST"
3776
NAME="REMOTEPUSHCONN"
3778
>Remote_push_conn Procedure</H3
3782
CLASS="FUNCSYNOPSIS"
3792
>remote_push_conn</TT
3805
CLASS="VARIABLELIST"
3826
NAME="REMOTERAWBINARY"
3828
>Remote_raw_binary Procedure</H3
3832
CLASS="FUNCSYNOPSIS"
3842
>remote_raw_binary</TT
3855
CLASS="VARIABLELIST"
3876
NAME="REMOTERAWCLOSE"
3878
>Remote_raw_close Procedure</H3
3882
CLASS="FUNCSYNOPSIS"
3892
>remote_raw_close</TT
3905
CLASS="VARIABLELIST"
3926
NAME="REMOTERAWFILE"
3928
>Remote_raw_file Procedure</H3
3932
CLASS="FUNCSYNOPSIS"
3942
>remote_raw_file</TT
3961
CLASS="VARIABLELIST"
3995
>remote_raw_ld Procedure</H3
3999
CLASS="FUNCSYNOPSIS"
4028
CLASS="VARIABLELIST"
4060
NAME="REMOTERAWLOAD"
4062
>Remote_raw_load Procedure</H3
4066
CLASS="FUNCSYNOPSIS"
4076
>remote_raw_load</TT
4101
CLASS="VARIABLELIST"
4144
NAME="REMOTERAWOPEN"
4146
>Remote_raw_open Procedure</H3
4150
CLASS="FUNCSYNOPSIS"
4160
>remote_raw_open</TT
4173
CLASS="VARIABLELIST"
4194
NAME="REMOTERAWSEND"
4196
>Remote_raw_send Procedure</H3
4200
CLASS="FUNCSYNOPSIS"
4210
>remote_raw_send</TT
4229
CLASS="VARIABLELIST"
4261
NAME="REMOTERAWSPAWN"
4263
>Remote_raw_spawn Procedure</H3
4267
CLASS="FUNCSYNOPSIS"
4277
>remote_raw_spawn</TT
4296
CLASS="VARIABLELIST"
4328
NAME="REMOTERAWTRANSMIT"
4330
>Remote_raw_transmit Procedure</H3
4334
CLASS="FUNCSYNOPSIS"
4344
>remote_raw_transmit</TT
4363
CLASS="VARIABLELIST"
4395
NAME="REMOTERAWWAIT"
4397
>Remote_raw_wait Procedure</H3
4401
CLASS="FUNCSYNOPSIS"
4411
>remote_raw_wait</TT
4430
CLASS="VARIABLELIST"
4464
>Remote_reboot Procedure</H3
4468
CLASS="FUNCSYNOPSIS"
4491
CLASS="VARIABLELIST"
4514
>Remote_send Procedure</H3
4518
CLASS="FUNCSYNOPSIS"
4547
CLASS="VARIABLELIST"
4581
>Remote_spawn Procedure</H3
4585
CLASS="FUNCSYNOPSIS"
4620
CLASS="VARIABLELIST"
4663
NAME="REMOTESWAPCONN"
4665
>Remote_swap_conn Procedure</H3
4669
CLASS="FUNCSYNOPSIS"
4679
>remote_swap_conn</TT
4692
CLASS="VARIABLELIST"
4713
NAME="REMOTETRANSMIT"
4715
>Remote_transmit Procedure</H3
4719
CLASS="FUNCSYNOPSIS"
4729
>remote_transmit</TT
4748
CLASS="VARIABLELIST"
4782
>Remote_upload Procedure</H3
4786
CLASS="FUNCSYNOPSIS"
4821
CLASS="VARIABLELIST"
4866
>Remote_wait Procedure</H3
4870
CLASS="FUNCSYNOPSIS"
4899
CLASS="VARIABLELIST"
4931
NAME="STANDARDCLOSE"
4933
>Standard_close Procedure</H3
4937
CLASS="FUNCSYNOPSIS"
4960
CLASS="VARIABLELIST"
4981
NAME="STANDARDDOWNLOAD"
4983
>Standard_download Procedure</H3
4987
CLASS="FUNCSYNOPSIS"
4997
>standard_download</TT
5022
CLASS="VARIABLELIST"
5067
>Standard_exec Procedure</H3
5071
CLASS="FUNCSYNOPSIS"
5100
CLASS="VARIABLELIST"
5134
>Standard_file Procedure</H3
5138
CLASS="FUNCSYNOPSIS"
5171
CLASS="VARIABLELIST"
5194
>Standard_load Procedure</H3
5198
CLASS="FUNCSYNOPSIS"
5233
CLASS="VARIABLELIST"
5276
NAME="STANDARDREBOOT"
5278
>Standard_reboot Procedure</H3
5282
CLASS="FUNCSYNOPSIS"
5292
>standard_reboot</TT
5305
CLASS="VARIABLELIST"
5328
>Standard_send Procedure</H3
5332
CLASS="FUNCSYNOPSIS"
5361
CLASS="VARIABLELIST"
5393
NAME="STANDARDSPAWN"
5395
>Standard_spawn Procedure</H3
5399
CLASS="FUNCSYNOPSIS"
5428
CLASS="VARIABLELIST"
5460
NAME="STANDARDTRANSMIT"
5462
>Standard_transmit Procedure</H3
5466
CLASS="FUNCSYNOPSIS"
5476
>standard_transmit</TT
5495
CLASS="VARIABLELIST"
5527
NAME="STANDARDUPLOAD"
5529
>Standard_upload Procedure</H3
5533
CLASS="FUNCSYNOPSIS"
5543
>standard_upload</TT
5548
>dest srcfile destfile</I
5556
CLASS="VARIABLELIST"
5601
>Standard_wait Procedure</H3
5605
CLASS="FUNCSYNOPSIS"
5634
CLASS="VARIABLELIST"
5666
NAME="UNIXCLEANFILENAME"
5668
>Unix_clean_filename Procedure</H3
5672
CLASS="FUNCSYNOPSIS"
5682
>unix_clean_filename</TT
5701
CLASS="VARIABLELIST"
5736
>Procedures For Using Utilities to Connect</H2
5738
>telnet, rsh, tip, kermit</P
5746
>telnet Procedure</H3
5750
CLASS="FUNCSYNOPSIS"
5777
CLASS="FUNCSYNOPSIS"
5809
CLASS="FUNCSYNOPSIS"
5832
CLASS="VARIABLELIST"
5843
>This refers to the IP address or name
5844
(for example, an entry in
5848
>) for this target. The
5849
procedure names reflect the Unix utility used to
5850
establish a connection. The optional
5856
> is used to specify the IP
5857
port number. The value of the
5867
> array is used. (was
5871
>) This value has two parts,
5872
the hostname and the port number, seperated by a
5876
>. If host or target is used in
5881
config array is used for all information.</P
5897
CLASS="FUNCSYNOPSIS"
5920
CLASS="VARIABLELIST"
5931
>Connect using the Unix utility
5941
be a name from the <SPAN
5949
>. Often, this is called
5953
>, or something like
5957
>. This file holds all the
5958
configuration data for the serial port. The value of
5966
> array is used. (was
5983
> field, than the config
5984
array is used for all information. the
5985
config array is used for all information.</P
5997
>Kermit Procedure</H3
6001
CLASS="FUNCSYNOPSIS"
6030
CLASS="VARIABLELIST"
6041
>Connect using the program
6073
speed to use (in its per second) for the
6074
connection. The value of the <SPAN
6099
config array is used for all information. the
6100
config array is used for all information.</P
6112
>kermit_open Procedure</H3
6116
CLASS="FUNCSYNOPSIS"
6145
CLASS="VARIABLELIST"
6177
NAME="KERMITCOMMAND"
6179
>Kermit_command Procedure</H3
6183
CLASS="FUNCSYNOPSIS"
6212
CLASS="VARIABLELIST"
6246
>Kermit_send Procedure</H3
6250
CLASS="FUNCSYNOPSIS"
6265
>dest string args</I
6273
CLASS="VARIABLELIST"
6316
NAME="KERMITTRANSMIT"
6318
>Kermit_transmit Procedure</H3
6322
CLASS="FUNCSYNOPSIS"
6332
>kermit_transmit</TT
6357
CLASS="VARIABLELIST"
6402
>Telnet_open Procedure</H3
6406
CLASS="FUNCSYNOPSIS"
6435
CLASS="VARIABLELIST"
6469
>Telnet_binary Procedure</H3
6473
CLASS="FUNCSYNOPSIS"
6496
CLASS="VARIABLELIST"
6517
NAME="TELNETTRANSMIT"
6519
>Telnet_transmit Procedure</H3
6523
CLASS="FUNCSYNOPSIS"
6533
>telnet_transmit</TT
6558
CLASS="VARIABLELIST"
6603
>Tip_open Procedure</H3
6607
CLASS="FUNCSYNOPSIS"
6630
CLASS="VARIABLELIST"
6653
>Rlogin_open Procedure</H3
6657
CLASS="FUNCSYNOPSIS"
6680
CLASS="VARIABLELIST"
6703
>Rlogin_spawn Procedure</H3
6707
CLASS="FUNCSYNOPSIS"
6736
CLASS="VARIABLELIST"
6770
>Rsh_open Procedure</H3
6774
CLASS="FUNCSYNOPSIS"
6797
CLASS="VARIABLELIST"
6820
>Rsh_download Procedure</H3
6824
CLASS="FUNCSYNOPSIS"
6859
CLASS="VARIABLELIST"
6904
>Rsh_upload Procedure</H3
6908
CLASS="FUNCSYNOPSIS"
6943
CLASS="VARIABLELIST"
6988
>Rsh_exec Procedure</H3
6992
CLASS="FUNCSYNOPSIS"
7027
CLASS="VARIABLELIST"
7072
>Ftp_open Procedure</H3
7076
CLASS="FUNCSYNOPSIS"
7099
CLASS="VARIABLELIST"
7122
>Ftp_upload Procedure</H3
7126
CLASS="FUNCSYNOPSIS"
7161
CLASS="VARIABLELIST"
7206
>Ftp_download Procedure</H3
7210
CLASS="FUNCSYNOPSIS"
7245
CLASS="VARIABLELIST"
7290
>Ftp_close Procedure</H3
7294
CLASS="FUNCSYNOPSIS"
7317
CLASS="VARIABLELIST"
7340
>Tip_download Procedure</H3
7344
CLASS="FUNCSYNOPSIS"
7373
CLASS="VARIABLELIST"
7391
> (the value returned
7392
when the connection was established), using the
7400
>. Most often used for
7401
single board computers that require downloading
7402
programs in ASCII S-records. Returns
7406
> if an error occurs,
7421
>This is the filename to
7435
>Procedures For Target Boards</H2
7445
>Default_link Procedure</H3
7449
CLASS="FUNCSYNOPSIS"
7490
CLASS="VARIABLELIST"
7544
NAME="DEFAULTTARGETASSEMBLE"
7546
>Default_target_assemble Procedure</H3
7550
CLASS="FUNCSYNOPSIS"
7560
>default_target_assemble</TT
7585
CLASS="VARIABLELIST"
7628
NAME="DEFAULTTARGETCOMPILE"
7630
>default_target_compile Procedure</H3
7634
CLASS="FUNCSYNOPSIS"
7644
>default_target_compile</TT
7675
CLASS="VARIABLELIST"
7731
>Pop_config Procedure</H3
7735
CLASS="FUNCSYNOPSIS"
7758
CLASS="VARIABLELIST"
7779
NAME="PRUNEWARNINGS"
7781
>Prune_warnings Procedure</H3
7785
CLASS="FUNCSYNOPSIS"
7808
CLASS="VARIABLELIST"
7831
>Push_build Procedure</H3
7835
CLASS="FUNCSYNOPSIS"
7858
CLASS="VARIABLELIST"
7881
>push_config Procedure</H3
7885
CLASS="FUNCSYNOPSIS"
7914
CLASS="VARIABLELIST"
7948
>Reboot_target Procedure</H3
7952
CLASS="FUNCSYNOPSIS"
7978
NAME="TARGETASSEMBLE"
7980
>Target_assemble Procedure</H3
7984
CLASS="FUNCSYNOPSIS"
7994
>target_assemble</TT
7999
>source destfile flags</I
8007
CLASS="VARIABLELIST"
8050
NAME="TARGETCOMPILE"
8052
>Target_compile Procedure</H3
8056
CLASS="FUNCSYNOPSIS"
8097
CLASS="VARIABLELIST"
8154
>Target Database Procedures</H2
8162
>Board_info Procedure</H3
8166
CLASS="FUNCSYNOPSIS"
8201
CLASS="VARIABLELIST"
8246
>Host_info Procedure</H3
8250
CLASS="FUNCSYNOPSIS"
8279
CLASS="VARIABLELIST"
8313
>Set_board_info Procedure</H3
8317
CLASS="FUNCSYNOPSIS"
8346
CLASS="VARIABLELIST"
8378
NAME="SETCURRTARGETINFO"
8380
>Set_currtarget_info Procedure</H3
8384
CLASS="FUNCSYNOPSIS"
8394
>set_currtarget_info</TT
8413
CLASS="VARIABLELIST"
8447
>Target_info Procedure</H3
8451
CLASS="FUNCSYNOPSIS"
8480
CLASS="VARIABLELIST"
8512
NAME="UNSETBOARDINFO"
8514
>Unset_board_info Procedure</H3
8518
CLASS="FUNCSYNOPSIS"
8528
>unset_board_info</TT
8541
CLASS="VARIABLELIST"
8562
NAME="UNSETCURRTARGETINFO"
8564
>Unset_currtarget_info Procedure</H3
8568
CLASS="FUNCSYNOPSIS"
8578
>unset_currtarget_info</TT
8591
CLASS="VARIABLELIST"
8614
>Push_target Procedure</H3
8616
>This makes the target named <I
8620
current target connection. The value of <I
8624
an index into the <SPAN
8627
> array and is set in
8628
the global config file.</P
8630
CLASS="FUNCSYNOPSIS"
8653
CLASS="VARIABLELIST"
8664
>The name of the target to make current
8677
>Pop_target Procedure</H3
8679
>This unsets the current target connection.</P
8681
CLASS="FUNCSYNOPSIS"
8709
>List_targets Procedure</H3
8711
>This lists all the supported targets for this
8714
CLASS="FUNCSYNOPSIS"
8742
>Push_host Procedure</H3
8744
>This makes the host named <I
8748
current remote host connection. The value of
8752
> is an index into the
8756
> array and is set in the global config
8759
CLASS="FUNCSYNOPSIS"
8782
CLASS="VARIABLELIST"
8805
>Pop_host Procedure</H3
8807
>This unsets the current host connection.</P
8809
CLASS="FUNCSYNOPSIS"
8837
>Compile Procedure</H3
8839
>This invokes the compiler as set by CC to compile the
8843
>. The default options for many cross
8844
compilation targets are <I
8848
these options can be added to by passing in more parameters as
8852
>. Optionally, this will also
8853
use the value of the <I
8856
> field in the target
8857
config array. If the host is not the same as the build machines, then
8858
then compiler is run on the remote host using
8861
>execute_anywhere</B
8864
CLASS="FUNCSYNOPSIS"
8887
CLASS="VARIABLELIST"
8910
>Archive Procedure</H3
8912
>This produces an archive file. Any parameters passed to
8916
> are used in addition to the default
8917
flags. Optionally, this will also use the value of the
8921
> field in the target config array. If the
8922
host is not the same as the build machines, then then archiver is run
8923
on the remote host using <B
8925
>execute_anywhere</B
8928
CLASS="FUNCSYNOPSIS"
8951
CLASS="VARIABLELIST"
8974
>Ranlib Procedure</H3
8976
>This generates an index for the archive file for systems that
8977
aren't POSIX yet. Any parameters passed to <B
8981
are used in for the flags.</P
8983
CLASS="FUNCSYNOPSIS"
9006
CLASS="VARIABLELIST"
9027
NAME="EXECUTEANYWHERE"
9029
>Execute_anywhere Procedure</H3
9031
>This executes the <I
9035
host. This should be used as a replacement for the Tcl command
9039
> as this version utilizes the target config
9040
info to execute this command on the build machine or a remote
9041
host. All config information for the remote host must be setup to
9042
have this command work. If this is a canadian cross, (where we test a
9043
cross compiler that runs on a different host then where DejaGnu is
9044
running) then a connection is made to the remote host and the command
9045
is executed there. It returns either REMOTERROR (for an error) or the
9046
output produced when the command was executed. This is used for
9047
running the tool to be tested, not a test case.</P
9049
CLASS="FUNCSYNOPSIS"
9059
>execute_anywhere</TT
9072
CLASS="VARIABLELIST"
9094
NAME="PLATFORMPROCS"
9096
>Platform Dependant Procedures</H2
9098
>Each combination of target and tool requires some
9099
target-dependent procedures. The names of these procedures have
9100
a common form: the tool name, followed by an underbar
9104
>, and finally a suffix describing the
9105
procedure's purpose. For example, a procedure to extract the
9118
> itself calls only two of these
9125
>${tool}_version</SPAN
9126
>; these procedures use no
9129
>The other two procedures, <SPAN
9131
>${tool}_start</SPAN
9136
>}, are only called by the test
9137
suites themselves (or by testsuite-specific initialization
9138
code); they may take arguments or not, depending on the
9139
conventions used within each testsuite.</P
9141
>The usual convention for return codes from any of these
9142
procedures (although it is not required by
9150
if the procedure succeeded, <I
9157
> if there was a communication error.</P
9165
>${tool}_start Procedure</H3
9167
>Starts a particular tool. For an interactive tool,
9171
> starts and initializes the
9172
tool, leaving the tool up and running for the test cases; an
9176
>, the start function
9177
for GDB. For a batch oriented tool,
9181
> is optional; the recommended
9182
convention is to let <TT
9186
tool, leaving the output in a variable called
9190
>. Test scripts can then analyze
9194
> to determine the test results.
9195
An example of this second kind of start function is
9199
>, the start function for GCC.</P
9201
>DejaGnu itself does not call
9205
>. The initialization
9208
>${tool}_init.exp</TT
9213
> for interactive tools;
9214
for batch-oriented tools, each individual test script calls
9219
arrangements to run the tool).</P
9221
CLASS="FUNCSYNOPSIS"
9249
>${tool}_load Procedure</H3
9251
>Loads something into a tool. For an interactive tool,
9252
this conditions the tool for a particular test case; for
9257
executable file into the debugger. For batch oriented tools,
9261
> may do nothing---though,
9262
for example, the GCC support uses
9266
> to load and run a binary on
9267
the target environment. Conventionally,
9271
> leaves the output of any
9272
program it runs in a variable called
9280
> can be the most complex
9281
part of extending DejaGnu to a new tool or a new target, if
9282
it requires much communication coding or file
9283
downloading. Test scripts call
9289
CLASS="FUNCSYNOPSIS"
9317
>${tool}_exit Procedure</H3
9319
>Cleans up (if necessary) before DejaGnu exits. For
9320
interactive tools, this usually ends the interactive
9321
session. You can also use <TT
9325
to remove any temporary files left over from the
9335
CLASS="FUNCSYNOPSIS"
9363
>${tool}_version Procedure</H3
9365
>Prints the version label and number for
9369
>. This is called by the DejaGnu
9370
procedure that prints the final summary report. The output
9371
should consist of the full path name used for the tested
9372
tool, and its version number.</P
9374
CLASS="FUNCSYNOPSIS"
9384
>${tool}_version</TT
9403
>Utility Procedures</H2
9411
>Getdirs Procedure</H3
9413
>Returns a list of all the directories in the single
9414
directory a single directory that match an optional
9417
CLASS="FUNCSYNOPSIS"
9446
CLASS="VARIABLELIST"
9468
>If you do not specify
9478
> assumes a default pattern of
9482
>. You may use the common shell
9483
wildcard characters in the pattern. If no directories
9484
match the pattern, then a NULL string is
9499
>Search for files whose names match <I
9503
(using shell wildcard characters for filename expansion). Search
9504
subdirectories recursively, starting at
9508
>. The result is the list of files whose
9509
names match; if no files match, the result is empty. Filenames in the
9510
result include all intervening subdirectory names. If no files match
9511
the pattern, then a NULL string is returned.</P
9513
CLASS="FUNCSYNOPSIS"
9542
CLASS="VARIABLELIST"
9553
>The top level directory to search the search
9565
>A csh "glob" style regular expression reprsenting
9566
the files to find.</P
9578
>Which Procedure</H3
9580
>Searches the execution path for an executable file
9584
>, like the the BSD <B
9588
utility. This procedure uses the shell environment variable
9596
binary is not in the path, or if there is no <I
9600
environment variable. If <B
9603
> is in the path, it
9604
returns the full path to <B
9609
CLASS="FUNCSYNOPSIS"
9632
CLASS="VARIABLELIST"
9643
>The executable program or shell script to look
9658
>Search the file called <TT
9662
specified path) for lines that contain a match for regular expression
9666
>. The result is a list of all the lines that
9667
match. If no lines match, the result is an empty string. Specify
9671
> using the standard regular expression style
9672
used by the Unix utility program grep.</P
9674
>Use the optional third argument <I
9678
start lines in the result with the line number in
9682
>. (This argument is simply an option
9683
flag; type it just as shown <TT
9688
CLASS="FUNCSYNOPSIS"
9723
CLASS="VARIABLELIST"
9734
>The file to search.</P
9745
>The Unix style regular expression (as used by the
9749
> Unix utility) to search
9761
>Prefix the line number to each line where the
9774
>Prune Procedure</H3
9776
>Remove elements of the Tcl list <I
9780
Elements are fields delimited by spaces. The result is a copy of
9781
list, without any elements that match <I
9785
You can use the common shell wildcard characters to specify the
9788
CLASS="FUNCSYNOPSIS"
9817
CLASS="VARIABLELIST"
9828
>A Tcl list containing the original data. Commonly
9829
this is the output of a batch executed command, like running a
9841
>The csh shell "glob" style pattern to search
9856
>This look in the process table for <I
9860
and send it a unix SIGINT, killing the process. This will only work
9861
under Windows if you have Cygwin or another Unix subsystem for Windows
9864
CLASS="FUNCSYNOPSIS"
9887
CLASS="VARIABLELIST"
9898
>The name of the program to kill.</P
9910
>Absolute Procedure</H3
9912
>This procedure takes the relative <I
9916
and converts it to an absolute path.</P
9918
CLASS="FUNCSYNOPSIS"
9941
CLASS="VARIABLELIST"
9952
>The path to convert.</P
9964
>Psource Procedure</H3
9966
>This sources the file <I
9970
all errors. It also ignores all extraneous output. If there was an
9971
error it returns a <I
9974
>, otherwise it returns a
9980
CLASS="FUNCSYNOPSIS"
10003
CLASS="VARIABLELIST"
10014
>The filename to Tcl script to
10025
NAME="RUNTESTFILEP"
10027
>Runtest_file_p Procedure</H3
10047
is a list of two elements. The first is a copy of what was on
10048
the right side of the <I
10059
CLASS="PROGRAMLISTING"
10060
>foo.exp="..."</PRE
10064
>" was specified, or
10065
an empty string if no such argument is present. The second is the
10066
pathname of the current testcase under consideration. This is used
10067
by tools like compilers where each testcase is a file.</P
10069
CLASS="FUNCSYNOPSIS"
10079
>runtest_file_p</TT
10098
CLASS="VARIABLELIST"
10109
>The list of patterns to compare against.
10121
>The test case filename.</P
10133
>Diff Procedure</H3
10135
>Compares the two files and returns a <I
10139
they match, or a <I
10142
> if they don't. If
10146
> is set, then it'll print the differences to
10149
CLASS="FUNCSYNOPSIS"
10178
CLASS="VARIABLELIST"
10189
>The first file to compare.</P
10200
>The second file to compare.</P
10212
>Setenv Procedure</H3
10214
>Sets the environment variable <I
10223
CLASS="FUNCSYNOPSIS"
10252
CLASS="VARIABLELIST"
10263
>The environment variable to set.</P
10274
>The value to set the variable to.</P
10286
>unsetenv Procedure</H3
10288
>Unsets the environment variable
10294
CLASS="FUNCSYNOPSIS"
10317
CLASS="VARIABLELIST"
10328
>The environment variable to
10341
>Getenv Procedure</H3
10343
>Returns the value of <I
10347
environment if it exists, otherwise it returns NULL.</P
10349
CLASS="FUNCSYNOPSIS"
10372
CLASS="VARIABLELIST"
10383
>The environment variable to get the value
10394
NAME="PRUNESYSTEMCRUD"
10396
>Prune_system_crud Procedure</H3
10401
>, delete text the host or
10402
target operating system might issue that will interfere with pattern
10403
matching of program output in <I
10407
is the message that is printed if a shared library is out of
10410
CLASS="FUNCSYNOPSIS"
10420
>prune_system_crud</TT
10439
CLASS="VARIABLELIST"
10450
>The system error messages to look for to screen out
10462
>The Tcl variable containing the
10476
>Libgloss, A Free BSP</H2
10478
>Libgloss is a free <I
10482
Package) commonly used with GCC and G++ to produce a fully linked
10483
executable image for an embedded systems.</P
10489
NAME="LIBGLOSSLINKFLAGS"
10491
>Libgloss_link_flags Procedure</H3
10495
CLASS="FUNCSYNOPSIS"
10505
>libgloss_link_flags</TT
10518
CLASS="VARIABLELIST"
10539
NAME="LIBGLOSSINCLUDEFLAGS"
10541
>Libgloss_include_flags Procedure</H3
10545
CLASS="FUNCSYNOPSIS"
10555
>libgloss_include_flags</TT
10568
CLASS="VARIABLELIST"
10589
NAME="NEWLIBLINKFLAGS"
10591
>Newlib_link_flags Procedure</H3
10595
CLASS="FUNCSYNOPSIS"
10605
>newlib_link_flags</TT
10618
CLASS="VARIABLELIST"
10639
NAME="NEWLIBINCLUDEFLAGS"
10641
>Newlib_include_flags Procedure</H3
10645
CLASS="FUNCSYNOPSIS"
10655
>newlib_include_flags</TT
10668
CLASS="VARIABLELIST"
10689
NAME="LIBIOINCLUDEFLAGS"
10691
>Libio_include_flags Procedure</H3
10695
CLASS="FUNCSYNOPSIS"
10705
>libio_include_flags</TT
10718
CLASS="VARIABLELIST"
10739
NAME="LIBIOLINKFLAGS"
10741
>Libio_link_flags Procedure</H3
10745
CLASS="FUNCSYNOPSIS"
10755
>libio_link_flags</TT
10768
CLASS="VARIABLELIST"
10789
NAME="GXXINCLUDEFLAGS"
10791
>G++_include_flags Procedure</H3
10795
CLASS="FUNCSYNOPSIS"
10805
>g++_include_flags</TT
10818
CLASS="VARIABLELIST"
10839
NAME="GXXLINKFLAGS"
10841
>G++_link_flags Procedure</H3
10845
CLASS="FUNCSYNOPSIS"
10855
>g++_link_flags</TT
10868
CLASS="VARIABLELIST"
10889
NAME="LIBSTDCXXINCLUDEFLAGS"
10891
>Libstdc++_include_flags Procedure</H3
10895
CLASS="FUNCSYNOPSIS"
10905
>libstdc++_include_flags</TT
10918
CLASS="VARIABLELIST"
10939
NAME="LIBSTDCXXLINKFLAGS"
10941
>Libstdc++_link_flags Procedure</H3
10945
CLASS="FUNCSYNOPSIS"
10955
>libstdc++_link_flags</TT
10968
CLASS="VARIABLELIST"
10989
NAME="GETMULTILIBS"
10991
>Get_multilibs Procedure</H3
10995
CLASS="FUNCSYNOPSIS"
11018
CLASS="VARIABLELIST"
11039
NAME="FINDBINUTILSPROG"
11041
>Find_binutils_prog Procedure</H3
11045
CLASS="FUNCSYNOPSIS"
11055
>find_binutils_prog</TT
11068
CLASS="VARIABLELIST"
11091
>Find_gcc Procedure</H3
11095
CLASS="FUNCSYNOPSIS"
11123
>Find_gcj Procedure</H3
11127
CLASS="FUNCSYNOPSIS"
11155
>Find_g++ Procedure</H3
11159
CLASS="FUNCSYNOPSIS"
11187
>Find_g77 Procedure</H3
11191
CLASS="FUNCSYNOPSIS"
11217
NAME="PROCESSMULTILIBOPTIONS"
11219
>Process_multilib_options Procedure</H3
11223
CLASS="FUNCSYNOPSIS"
11233
>process_multilib_options</TT
11246
CLASS="VARIABLELIST"
11267
NAME="ADDMULTILIBOPTION"
11269
>Add_multilib_option Procedure</H3
11273
CLASS="FUNCSYNOPSIS"
11283
>add_multilib_option</TT
11296
CLASS="VARIABLELIST"
11319
>Find_gas Procedure</H3
11323
CLASS="FUNCSYNOPSIS"
11351
>Find_ld Procedure</H3
11355
CLASS="FUNCSYNOPSIS"
11381
NAME="BUILDWRAPPER"
11383
>Build_wrapper Procedure</H3
11387
CLASS="FUNCSYNOPSIS"
11410
CLASS="VARIABLELIST"
11431
NAME="WINSUPINCLUDEFLAGS"
11433
>Winsup_include_flags Procedure</H3
11437
CLASS="FUNCSYNOPSIS"
11447
>winsup_include_flags</TT
11460
CLASS="VARIABLELIST"
11481
NAME="WINSUPLINKFLAGS"
11483
>Winsup_link_flags Procedure</H3
11487
CLASS="FUNCSYNOPSIS"
11497
>winsup_link_flags</TT
11510
CLASS="VARIABLELIST"
11534
>Procedures for debugging your Tcl code.</H2
11538
>lib/debugger.exp</TT
11539
>defines these utility
11548
>Dumpvars Procedure</H3
11550
>This takes a csh style regular expression (glob rules) and prints
11551
the values of the global variable names that match. It is abbreviated
11557
CLASS="FUNCSYNOPSIS"
11580
CLASS="VARIABLELIST"
11591
>The variables to dump.</P
11603
>Dumplocals Procedure</H3
11605
>This takes a csh style regular expression (glob rules) and
11606
prints the values of the local variable names that match. It is
11612
CLASS="FUNCSYNOPSIS"
11635
CLASS="VARIABLELIST"
11658
>Dumprocs Procedure</H3
11660
>This takes a csh style regular expression (glob rules) and
11661
prints the body of all procs that match. It is abbreviated as
11667
CLASS="FUNCSYNOPSIS"
11690
CLASS="VARIABLELIST"
11701
>The csh "glob" style pattern to look
11714
>Dumpwatch Procedure</H3
11716
>This takes a csh style regular expression (glob rules) and
11717
prints all the watchpoints. It is abbreviated as
11723
CLASS="FUNCSYNOPSIS"
11746
CLASS="VARIABLELIST"
11757
>The csh "glob" style pattern to look
11770
>Watcharray Procedure</H3
11774
CLASS="FUNCSYNOPSIS"
11803
CLASS="VARIABLELIST"
11814
>The csh "glob" style pattern to look
11827
>Watchvar Procedure</H3
11831
CLASS="FUNCSYNOPSIS"
11860
CLASS="VARIABLELIST"
11883
>Watchunset Procedure</H3
11885
>This breaks program execution when the variable
11889
> is unset. It is abbreviated as
11895
CLASS="FUNCSYNOPSIS"
11918
CLASS="VARIABLELIST"
11941
>Watchwrite Procedure</H3
11943
>This breaks program execution when the variable
11947
> is written. It is abbreviated as
11953
CLASS="FUNCSYNOPSIS"
11976
CLASS="VARIABLELIST"
11987
>The variable to watch.</P
11999
>Watchread Procedure</H3
12001
>This breaks program execution when the variable
12005
> is read. It is abbreviated as
12011
CLASS="FUNCSYNOPSIS"
12034
CLASS="VARIABLELIST"
12045
>The variable to watch.</P
12057
>Watchdel Procedure</H3
12059
>This deletes a the watchpoint from the watch list. It is
12065
CLASS="FUNCSYNOPSIS"
12088
CLASS="VARIABLELIST"
12111
>Print Procedure</H3
12113
>This prints the value of the variable
12119
>. It is abbreviated as
12125
CLASS="FUNCSYNOPSIS"
12148
CLASS="VARIABLELIST"
12171
>Quit Procedure</H3
12173
>This makes runtest exit. It is abbreviated as
12179
CLASS="FUNCSYNOPSIS"
12202
CLASS="VARIABLELIST"
12224
WIDTH="100%"><TABLE
12225
SUMMARY="Footer navigation table"
12238
><<< Previous</A
12256
>Next >>></A
b'\\ No newline at end of file'