This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


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

Re: How to use GCC testsuite..?


Venkatesan Jeevanandam <Venkatesan_jeevanandam@mindtree.com> wrote on
26/06/2007 09:26:18:

> Hi,
>
> I have been given a set of cross-compiler binaries (like arch-gcc,
> arch-as, arch-ld, arch-ar, arch-gdb, etc.,).
> How can i test "arch-gcc" cross-compiler binary using GCC testsuite ?

Do you have an access to such "arch" machine?
The running itself should be done on the target ("arch") machine.

AFAIK, if you don't have such machine, you won't be able to run all the
"need-to-be-executed" tests.
Only the tests that not suppose to run will be tested (like
compilation-only tests).

If you do have such machine, you need to compile on the host (current)
machine and run the binaries remotely.
That can be done by:
1. Write in your .shrc/.bashrc/...: setenv/export DEJAGNU
/home/<$USER>/etc/site.exp
2. Write in /home/<$USER>/etc/site.exp:
append boards_dir "/home/<$USER>/etc/boards"
case "$target_triplet" in {
      { "arch*-*-*" } { set target_list { <name of the machine> } }
}
3. Create a file /home/<$USER>/etc/boards/<name of the machine> and write
in it:
load_generic_config "unix"  (or anything else...)
set_board_info hostname "<name of the machine>"
set_board_info username <user>
set_board_info rsh_prog /usr/bin/ssh  (or anything else...)
set_board_info rcp_prog /usr/bin/scp  (or anything else...)
<Here can come other needed settings...>

Now, actually, you can run the testsuite (as usual, with "make -k check",
or similar command).
In case you have a promt for a passphrase every time you logon to the
target machine, you'll need to type the password for each test.
That is very annoying.
In order to solve that you can use ssa-agent:
1. Type: ssh-keygen -t rsa
2. Type:eval `/usr/bin/ssh-agent  -s`
3. Type: /usr/bin/ssh-add < /dev/null
4. copy your ~/.ssh/id_rsa.pub file (generated in the above process) to the
file ~/.ssh/authorized_keys on the machine(s) you wish to be able to access
without a password.

Now you can run "make check" "as usual".

HTH. Good luck,
Tehila.

>
> i have downloaded and extracted gcc-testsuite.x.y.tar.gz. I have also
> installed dejagnu, TCL and expect for testing the cross-compiler with
> gcc testsuite.
>
> Thank you.
>
> Regards
> Venkat
> --
> Venkatesan Jeevanandam <Venkatesan_jeevanandam@mindtree.com>
>
>
> DISCLAIMER:
> This message (including attachment if any) is confidential and may
> be privileged. Before opening attachments please check them for
> viruses and defects. MindTree Consulting Limited (MindTree) will not
> be responsible for any viruses or defects or any forwarded
> attachments emanating either from within MindTree or outside. If you
> have received this message by mistake please notify the sender by
> return  e-mail and delete this message from your system. Any
> unauthorized use or dissemination of this message in whole or in
> part is strictly prohibited.Please note that e-mails are susceptible
> to change and MindTree shall not be liable for any improper,
> untimely or incomplete transmission.
> E-mail may contain viruses. Before opening attachments please check
> them for viruses and defects. While MindTree Consulting Limited
> (MindTree) has put in place checks to minimize the risks, MindTree
> will not be responsible for any viruses or defects or any forwarded
> attachments emanating either from within MindTree or outside.


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