Next: , Previous: , Up: Customizing DejaGnu  

3.4 Remote host testing

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.

The recommended source for a Windows-based FTP server is to get IIS (either IIS 1 or Personal Web Server) from 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.

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.

You’ll also need a telnet server. For Windows, go to the Ataman 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.

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.

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:

Remote host setup

cd /usr/local/swamp/testing
mkdir boards
scp .
scp .
scp boards/foobar.exp
export DEJAGNU=/usr/local/swamp/testing/site.exp

You must edit the boards/foobar.exp file to reflect your machine; change the hostname (, username (iusr_foobar), password, and ftp_directory (c:/piggy) to match what you selected.

Edit the global site.exp to reflect your boards directory:

Add The Board Directory

lappend boards_dir "/usr/local/swamp/testing/boards"

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:

Setup Cross Remote Testing

./MkTestDir sh-hms /usr/dejagnu/src/devo

If you are testing a native PC compiler (ex: you have gcc.exe in your PATH on the PC), do this:

Setup Native Remote Testing

./MkTestDir '' /usr/dejagnu/src/devo

To test the setup, ftp 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.

Run Test Remotely

cd /usr/local/swamp/testing
make  -k -w check RUNTESTFLAGS="--host_board foobar --target_board foobar -v -v" > check.out 2>&1

To run a specific test, use a command like this (for this example, you’d run this from the gcc directory that MkTestDir created):

Run a Test Remotely

make check RUNTESTFLAGS="--host_board sloth --target_board sloth -v compile.exp=921202-1.c"

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.

Next: , Previous: , Up: Customizing DejaGnu