blob: 4eca0759381437027adf358fc0de8ecc15d20c20 [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<HTML
><HEAD
><TITLE
>Remote Host Testing</TITLE
><META
NAME="GENERATOR"
CONTENT="Modular DocBook HTML Stylesheet Version 1.76b+
"><LINK
REL="HOME"
TITLE="DejaGnu"
HREF="book1.html"><LINK
REL="UP"
TITLE="Customizing DejaGnu"
HREF="c848.html"><LINK
REL="PREVIOUS"
TITLE="Board Config File"
HREF="x935.html"><LINK
REL="NEXT"
TITLE="Config File Values"
HREF="x992.html"></HEAD
><BODY
CLASS="SECT1"
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="x935.html"
ACCESSKEY="P"
>&#60;&#60;&#60; Previous</A
></TD
><TD
WIDTH="80%"
ALIGN="center"
VALIGN="bottom"
>Customizing DejaGnu</TD
><TD
WIDTH="10%"
ALIGN="right"
VALIGN="bottom"
><A
HREF="x992.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
></TABLE
><HR
ALIGN="LEFT"
WIDTH="100%"></DIV
><DIV
CLASS="SECT1"
><H1
CLASS="SECT1"
><A
NAME="RELENG"
></A
>Remote Host Testing</H1
><DIV
CLASS="NOTE"
><P
></P
><TABLE
CLASS="NOTE"
WIDTH="100%"
BORDER="0"
><TR
><TD
WIDTH="25"
ALIGN="CENTER"
VALIGN="TOP"
><IMG
SRC="./stylesheet-images/note.gif"
HSPACE="5"
ALT="Note"></TD
><TD
ALIGN="LEFT"
VALIGN="TOP"
><P
>Thanks to Dj Delorie for the original paper that
this section is based on.</P
></TD
></TR
></TABLE
></DIV
><P
>DejaGnu also supports running the tests on a remote
host. To set this up, the remote host needs an ftp server, and a
telnet server. Currently foreign operating systems used as
remote hosts are VxWorks, VRTX, DOS/Windows 3.1, MacOS and Windows.</P
><P
>The recommended source for a Windows-based FTP
server is to get IIS (either IIS 1 or Personal Web Server) from
<A
HREF="http://www.microsoft.com"
TARGET="_top"
>http://www.microsoft.com</A
>.
When you install it, make sure you install the FTP server - it's
not selected by default. Go into the IIS manager and change the
FTP server so that it does not allow anonymous FTP. Set the home
directory to the root directory (i.e. c:\) of a suitable
drive. Allow writing via FTP.</P
><P
>It will create an account like IUSR_FOOBAR where foobar is
the name of your machine. Go into the user editor and give that
account a password that you don't mind hanging around in the
clear (i.e. not the same as your admin or personal
passwords). Also, add it to all the various permission groups.</P
><P
>You'll also need a telnet server. For Windows, go
to the <A
HREF="http://ataman.com"
TARGET="_top"
>Ataman</A
> web site,
pick up the Ataman Remote Logon Services for Windows, and
install it. You can get started on the eval period anyway. Add
IUSR_FOOBAR to the list of allowed users, set the HOME directory
to be the same as the FTP default directory. Change the Mode
prompt to simple.</P
><P
>Ok, now you need to pick a directory name to do all the
testing in. For the sake of this example, we'll call it piggy
(i.e. c:\piggy). Create this directory.</P
><P
>You'll need a unix machine. Create a directory for the
scripts you'll need. For this example, we'll use
/usr/local/swamp/testing. You'll need to have a source tree
somewhere, say /usr/src/devo. Now, copy some files from
releng's area in SV to your machine:</P
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN965"
></A
><P
><B
>Example 6. Remote host setup</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="SCREEN"
> cd /usr/local/swamp/testing
mkdir boards
scp darkstar.welcomehome.org:/dejagnu/cst/bin/MkTestDir .
scp darkstar.welcomehome.org:/dejagnu/site.exp .
scp darkstar.welcomehome.org:/dejagnu/boards/useless98r2.exp boards/foobar.exp
export DEJAGNU=/usr/local/swamp/testing/site.exp
</PRE
></TD
></TR
></TABLE
></DIV
><P
>You must edit the boards/foobar.exp file to reflect your
machine; change the hostname (foobar.com), username
(iusr_foobar), password, and ftp_directory (c:/piggy) to match
what you selected.</P
><P
>Edit the global <TT
CLASS="FILENAME"
> site.exp</TT
> to reflect your
boards directory:</P
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN971"
></A
><P
><B
>Example 7. Add The Board Directory</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
> lappend boards_dir "/usr/local/swamp/testing/boards"
</PRE
></TD
></TR
></TABLE
></DIV
><P
>Now run MkTestDir, which is in the contrib
directory. The first parameter is the toolchain prefix, the
second is the location of your devo tree. If you are testing a
cross compiler (ex: you have sh-hms-gcc.exe in your PATH on
the PC), do something like this:</P
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN975"
></A
><P
><B
>Example 8. Setup Cross Remote Testing</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
> ./MkTestDir sh-hms /usr/dejagnu/src/devo
</PRE
></TD
></TR
></TABLE
></DIV
><P
>If you are testing a native PC compiler (ex: you have
gcc.exe in your PATH on the PC), do this:</P
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN979"
></A
><P
><B
>Example 9. Setup Native Remote Testing</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
> ./MkTestDir '' /usr/dejagnu/src/devo
</PRE
></TD
></TR
></TABLE
></DIV
><P
>To test the setup, <B
CLASS="COMMAND"
>ftp</B
> to your PC
using the username (iusr_foobar) and password you selected. CD
to the test directory. Upload a file to the PC. Now telnet to
your PC using the same username and password. CD to the test
directory. Make sure the file is there. Type "set" and/or "gcc
-v" (or sh-hms-gcc -v) and make sure the default PATH contains
the installation you want to test.</P
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN984"
></A
><P
><B
>Example 10. Run Test Remotely</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
> cd /usr/local/swamp/testing
make -k -w check RUNTESTFLAGS="--host_board foobar --target_board foobar -v -v" &#62; check.out 2&#62;&#38;1
</PRE
></TD
></TR
></TABLE
></DIV
><P
>To run a specific test, use a command like this (for
this example, you'd run this from the gcc directory that
MkTestDir created):</P
><DIV
CLASS="EXAMPLE"
><A
NAME="AEN988"
></A
><P
><B
>Example 11. Run a Test Remotely</B
></P
><TABLE
BORDER="0"
BGCOLOR="#E0E0E0"
WIDTH="100%"
><TR
><TD
><PRE
CLASS="PROGRAMLISTING"
> make check RUNTESTFLAGS="--host_board sloth --target_board sloth -v compile.exp=921202-1.c"
</PRE
></TD
></TR
></TABLE
></DIV
><P
>Note: if you are testing a cross-compiler, put in the
correct target board. You'll also have to download more .exp
files and modify them for your local configuration. The -v's
are optional.</P
></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="x935.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="x992.html"
ACCESSKEY="N"
>Next &#62;&#62;&#62;</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>Board Config File</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="c848.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Config File Values</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>