From 8350550d0f8bed678e55d273649dd846619b91c4 Mon Sep 17 00:00:00 2001 From: Ben Elliston Date: Wed, 6 Apr 2016 19:39:09 +1000 Subject: [PATCH] * doc/dejagnu.texi (Global config file): Put before node 'Local config file'. --- ChangeLog | 5 +++ doc/dejagnu.texi | 128 +++++++++++++++++++++++++++---------------------------- 2 files changed, 68 insertions(+), 65 deletions(-) diff --git a/ChangeLog b/ChangeLog index 17c51c9..5203664 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-04-06 Ben Elliston + + * doc/dejagnu.texi (Global config file): Put before node 'Local + config file'. + 2016-04-05 Ben Elliston * runtest.exp: Remove defunct and undocumented --tool_root option. diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi index c2033bf..734e200 100644 --- a/doc/dejagnu.texi +++ b/doc/dejagnu.texi @@ -42,8 +42,8 @@ Running tests Customizing DejaGnu -* Local config file:: * Global config file:: +* Local config file:: * Board config file:: * Remote host testing:: * Config file values:: @@ -993,6 +993,66 @@ command line. * Config file values:: @end menu +@node Global config file, Board config file, Local config file, Customizing DejaGnu +@section Global config file + +The global configuration file is where all the target specific +configuration variables for a site are set. For example, a centralized +testing lab where multiple developers have to share an embedded +development board. There are settings for both remote hosts and remote +targets. Below is an example of a global configuration file for a +Canadian cross environment. A Canadian cross is a toolchain that is +built on, runs on, and targets three different system triplets (for +example, building a Solaris-hosted MIPS R4000 toolchain on a GNU/Linux +system). All configuration values in the example below are +site-specific. + +@strong{Example global configuration file} + +@example +# Make sure we look in the right place for the board description files. +lappend boards_dir "/nfs/cygint/s1/cygnus/dejagnu/boards" + +verbose "Global config file: target_triplet is $target_triplet" 2 +global target_list + +case "$target_triplet" in @{ + @{ "native" @} @{ + set target_list "unix" + @} + @{ "sparc64-*elf" @} @{ + set target_list "sparc64-sim" + @} + @{ "mips-*elf" @} @{ + set target_list "mips-sim wilma barney" + @} + @{ "mips-lsi-elf" @} @{ + set target_list "mips-lsi-sim@{,soft-float,el@}" + @} +@} +@end example + +In this case, we have support for several cross compilers, that all run +on this host. To run DejaGnu tests on tools hosted on operating systems +that do not run Expect, DejaGnu can be run on the build machine and +connect to the remote host to run all the tests. As you can see, all +one does is set the variable @code{target_list} to the list of targets +and options to test. + +In this example, simple cases like @emph{sparc64-elf} only require +setting the name of the single board configuration file. The +@emph{mips-elf} target is more complicated and sets the list to three +target boards. @emph{mips-sim} is a symbolic name for a simulator +``board'' and @emph{wilma} and @emph{barney} are symbolic names for +physical boards. Symbolic names are covered in the @ref{Adding a new +board} section. The more complicated example is the entry for +@emph{mips-lsi-elf}. This one runs the tests with multiple iterations +using all possible combinations of the @code{--soft-float} and the +@code{--el} (little endian) options. The braced string includes an +initial comma so that the set of combinations includes no options at +all. Needless to say, this last target example is mostly specific to +compiler testing. + @node Local config file, Global config file, , Customizing DejaGnu @section Local config file @@ -1029,7 +1089,7 @@ to override any defaults. @strong{The first section ends with this line} @example - ## All variables above are generated by configure. Do Not Edit ## +## All variables above are generated by configure. Do Not Edit ## @end example You can make any changes under this line. If you wish to redefine a @@ -1074,69 +1134,7 @@ The local @file{site.exp} may also set Tcl variables such as wait for a remote test to complete. If not specified, @code{test_timeout} defaults to 300 seconds. -@node Global config file, Board config file, Local config file, Customizing DejaGnu -@section Global config file - -The global configuration file is where all the target specific -configuration variables for an entire site get set. For example, a -centralized testing lab where people have to share a target between -multiple developers. There are settings for both remote targets and -remote hosts. Below is an example of a global configuration file for a -@emph{Canadian cross} environment. A Canadian cross is when you build -and test a cross-compiler on a platform other than the one it will run -on (for example, building a Solaris cross MIPS toolchain on a GNU/Linux -system). Note that all configuration values below are site-dependent. -Here we have two sets of values for testing m68k-aout -cross-compilers. As both of these target boards has a different -debugging protocol, we test on both of them in sequence. - -@strong{Example file} - -@example -# Make sure we look in the right place for the board description files. -lappend boards_dir "/nfs/cygint/s1/cygnus/dejagnu/boards" - -verbose "Global config file: target_triplet is $target_triplet" 2 -global target_list - -case "$target_triplet" in @{ - @{ "native" @} @{ - set target_list "unix" - @} - @{ "sparc64-*elf" @} @{ - set target_list "sparc64-sim" - @} - @{ "mips-*elf" @} @{ - set target_list "mips-sim wilma barney" - @} - @{ "mips-lsi-elf" @} @{ - set target_list "mips-lsi-sim@{,soft-float,el@}" - @} -@} -@end example - -In this case, we have support for several cross compilers, that all run -on this host. For testing tools that run on operating systems that -cannot run Expect natively, DejaGnu can be run on the build machine and -connect to the remote host to run all the tests for this cross compiler -on that host. As you can see, all one does is set the variable -@code{target_list} to the list of targets and options to test. - -The simple settings, like for @emph{sparc64-elf} only require setting -the name of the single board configuration file. The @emph{mips-elf} -target is more complicated and sets the list to three target -boards. @emph{mips-sim} is a symbolic name for a simulator target and -@emph{wilma} and @emph{barney} are symbolic names for MIPS -boards. Symbolic names are covered in the @ref{Adding a new board} -section. The more complicated example is the entry for -@emph{mips-lsi-elf}. This one runs the tests with multiple iterations -using all possible combinations of the @code{--soft-float} and the -@code{--el} (little endian) options. The braced string includes an -initial comma so that the set of combinations includes no options at -all. Needless to say, this last target example is mostly specific to -compiler testing. - -@node Board config file, Remote host testing, Global config file, Customizing DejaGnu +@node Board config file, Remote host testing, Local config file, Customizing DejaGnu @section Board configuration file The board configuration file is where board-specific configuration -- 2.7.4