This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

whew. remote testing working. Writeup online.


Dan Kegel writes:
 > http://www.kegel.com/crossgcc/simple.html is my try at
 > describing how to get remote testing with dejagnu working.
 > 
 > I feel much better now.

Some notes people may or may not find useful.

1) Regarding tracing of what dejagnu is doing: try
make check RUNTESTFLAGS="-v -v -v -v"

or just "runtest -v -v -v -v ..."

Level 4 is (or has been) the max.  Try various levels.
The lower levels (-v and -v -v) are excessively verbose for my
tastes but way back when I was unable to convince the powers that be of this.

2) To avoid confusion I would replace
"The TCL command target_compile ..." and
"The TCL command remote_load ..."

with

"The Dejagnu function target_compile ..." and
"The Dejagnu function remote_load ..."

3) It'd be useful to mention the $DEJAGNU variable (or ~/.dejagnurc I think).
And while the topic of your document is remote testing the context
is cross toolchains, thus it would be nice to mention simulation.
The following also applies to target boards though, the tricky part is
setting target_list correctly plus corresponding board configuration
which you've already covered to some extent.

Suppose you've built an arm-elf toolchain (*1) and want to test it.
Here are the steps one can use:

a) Create a file, called, say ~/etc/dejagnu.exp.

In the file put:

switch -glob "$target_triplet" {
    "arm-*-elf" {
	set target_list { arm-sim }
    }

    default {
	send_user "ERROR: dejagnu.exp Unknown target $target_triplet\n"
	exit 1
    }
}

This will create a file that tells dejagnu to use the simulator
for tool testing.

b) point $DEJAGNU at the file

bash$ export DEJAGNU=$HOME/etc/dejagnu.exp

This will save having to specify --target_board each time.

c) Then, running dejagnu reduces to:

cd $HOME/arm/b-binutils
make -k check
cd $HOME/arm/b-gcc
make -k check
cd $HOME/arm/b-gdb
make -k check

(*1) For completeness' sake, having just built it, here's what I did:

cd $HOME/arm
mkdir rel
PATH=$PATH:$HOME/arm/rel/bin
tar xfz binutils-2.13.2.1.tar.gz
tar xfz gcc-3.3.tar.gz
tar xfz newlib-1.11.0.tar.gz
tar xfz gdb-5.3.tar.gz
mkdir b-binutils b-gcc b-newlib b-gdb
cd b-binutils
../binutils-2.13.2.1/configure --target=arm-elf --prefix=$HOME/arm/rel
make
make install
cd ../b-gcc
../gcc-3.3/configure --target=arm-elf --prefix=$HOME/arm/rel --enable-languages=c
make
make install
cd ../b-newlib
../newlib-1.11.0/configure --target=arm-elf --prefix=$HOME/arm/rel
make
make install
cd ../b-gdb
../gdb-5.3/configure --target=arm-elf --prefix=$HOME/arm/rel
make
make install

------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]