dejagnu
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isremote and unix board special handling question


From: Simon Marchi
Subject: Re: isremote and unix board special handling question
Date: Wed, 28 Nov 2018 13:32:21 +0000

On 2018-11-27 5:46 p.m., Steve Ellcey wrote:
> I have a question about the special handling of the 'unix' name in 
> dejagnu.  I am doing some GCC testing which uses dejagnu and I
> want to create a new baseboard (unix-sysroot) which is just like
> unix but sets ldflags so I can run GCC with a newly built glibc
> in a non-standard location.
> 
> Specifically, I added this:
> 
> if {[info exists env(DEJAGNU_UNIX_SYSROOT_FLAGS)]} {
>     set_board_info ldflags "$env(DEJAGNU_UNIX_SYSROOT_FLAGS)"
> }
> 
> Now when I did this, the GCC testsuite tried to run the testsuite
> as if unix-sysroot was a remote system.  I was told I needed to
> set isremote to 0 so I put 'set_board_info isremote 0' in my
> unix-sysroot.exp file but it doesn't seem to be working.  When
> I run dejagnu with -v options I see:
> 
> board is unix-sysroot, isremote is 1
> 
> If I edit /usr/share/dejagnu/framework.exp and add the same
> exception we have for unix to also check for unix-sysroot then it
> does work.
> 
> framework.exp says:
> 
>     # We're on the "build". The check for the empty string is just for
>     # paranoia's sake--we shouldn't ever get one. "unix" is a magic
>     # string that should really go away someday.
>     if { $board == "build" || $board == "unix" || $board == "" } {
>         verbose "board is $board, not remote" 3
>         return 0
>     }
> 
> Does anyone know why setting isremote is not working?  I put it in
> the beginning, end, and middle of my unix-sysroot.exp with no apparent
> affect.  Is this why the exception for "unix" is still in framework.exp
> because isremote is not working?  The code to check isremote in
> framework.exp looks correct, it seems more like my setting of isremote
> is either not taking effect or is getting overridden somewhere.

If it can help, GDB has the same issue (board considered remote just because
their name is not unix), and we also work around that by forcing isremote to 0.
It is done with this file, which is included in other board files:

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=blob;f=gdb/testsuite/boards/local-board.exp;h=df9e5bf588d13b6fe535439e51c6f5fd1ed231fb;hb=HEAD

Simon

reply via email to

[Prev in Thread] Current Thread [Next in Thread]