diff options
author | Bernhard Reutner-Fischer <aldot@gcc.gnu.org> | 2013-06-17 19:22:10 +1000 |
---|---|---|
committer | Ben Elliston <bje@gnu.org> | 2013-06-17 19:22:10 +1000 |
commit | 5481f29161477520c691d525653323b82fa47ad7 (patch) | |
tree | a2b8516f22fc55175e4f2d512835a5f186189801 /doc | |
parent | b97cf09cd7b79d87b4ecfa064657140e25a8958e (diff) | |
download | dejagnu-5481f29161477520c691d525653323b82fa47ad7.zip dejagnu-5481f29161477520c691d525653323b82fa47ad7.tar.gz dejagnu-5481f29161477520c691d525653323b82fa47ad7.tar.bz2 |
* runtest.exp (libdirs): New global variable.
(load_lib): Append libdirs to search_and_load_files directories.
* doc/ref.xml (load_lib): Document global variable libdirs.
* doc/dejagnu.texi: Regenerate.
* testsuite/runtest.all/load_lib.exp: New testcase.
* Makefile.am (TESTSUITE_FILES): Add new testcase.
* Makefile.in: Regenerate.
Signed-off-by: Ben Elliston <bje@gnu.org>
Diffstat (limited to 'doc')
-rw-r--r-- | doc/dejagnu.texi | 17 | ||||
-rw-r--r-- | doc/ref.xml | 15 |
2 files changed, 30 insertions, 2 deletions
diff --git a/doc/dejagnu.texi b/doc/dejagnu.texi index f53291d..9e6c606 100644 --- a/doc/dejagnu.texi +++ b/doc/dejagnu.texi @@ -4257,7 +4257,8 @@ to print string without a trailing newline. Use the optional @node load_lib procedure, , verbose procedure, Core Internal Procedures @subsubsection Load_lib Procedure -Loads a DejaGnu library file by searching a fixed path built +Loads a DejaGnu library file by searching the default fixed paths +built into DejaGnu. If DejaGnu has been installed, it looks in a path starting with the installed library directory. If you are running DejaGnu directly from a source directory, without first running @@ -4279,6 +4280,20 @@ The name of the DejaGnu library file to load. @end table +The global variable @code{libdirs}, handled +as a list, is appended to the default fixed paths built +into DejaGnu. + +@strong{Additional search directories for load_lib} + +@example +# append a non-standard search path + global libdirs + lappend libdirs $srcdir/../../gcc/testsuite/lib + # now loading $srcdir/../../gcc/testsuite/lib/foo.exp works + load_lib foo.exp +@end example + @node Procedures For Remote Communication, connprocs, Core Internal Procedures, Builtin Procedures @subsection Procedures For Remote Communication diff --git a/doc/ref.xml b/doc/ref.xml index b366207..18ae3bc 100644 --- a/doc/ref.xml +++ b/doc/ref.xml @@ -1015,7 +1015,8 @@ <sect4 id="loadlib" xreflabel="load_lib procedure"> <title>Load_lib Procedure</title> - <para>Loads a &dj; library file by searching a fixed path built + <para>Loads a &dj; library file by searching the default fixed paths + built into &dj;. If &dj; has been installed, it looks in a path starting with the installed library directory. If you are running &dj; directly from a source directory, without first running @@ -1038,6 +1039,18 @@ load.</para></listitem> </varlistentry> </variablelist> + <para>The global variable <parameter>libdirs</parameter>, handled + as a list, is appended to the default fixed paths built + into &dj;.</para> + <example> + <title>Additional search directories for <function>load_lib</function></title> + <programlisting># append a non-standard search path + global libdirs + lappend libdirs $srcdir/../../gcc/testsuite/lib + # now loading $srcdir/../../gcc/testsuite/lib/foo.exp works + load_lib foo.exp</programlisting> + </example> + </sect4> </sect3> |