Re: [RFC] new board file 'remote-host-native.exp'

Pedro Alves
2012-07-25T13:48:33Z

On 07/25/2012 08:27 AM, Yao Qi wrote:
> On Tuesday, July 24, 2012 05:08:26 PM Pedro Alves wrote:
>> Why natively? I'd think you could use both this host board with e.g.,
>> a gdbserver target board file. I suggest:
>>
>> +# This file is a dejagnu "board file" and is used to run the testsuite
>> +# against local host, in remote host mode.
>>
>> I'd even rename the file to local-remote-host.exp.
>>
>
> Looks term "native" can be used for target board file, while term
> "local/remote" can be used for host board file. Comment is fixed.
> I thought of 'local-remote-host.exp' before, but gave it up since I
> was afraid people are confused by its name. I am fine with it.

If nobody complains, let's run with it.

>>> +set_board_info username YOUR.USER.NAME
>>
>> We can make this pick up the current user by default on at least GNU/Linux,
>> and probably other Unixen:
>>
>> set_board_info username $::env(USER)
>>
>
> What does these double colons mean? I use $env(USER), and it works fine.

Ah, I just basically copy/pasted from <http://wiki.tcl.tk/1624> :

"To access the env array within a Tcl proc, one needs to tell the proc that env is a global array. There are two ways to do this.

$::env(PATH)
global env ; puts $env(PATH) can alternatively used to identify that the variable is
globally available; however, you have to remember to use the global command
in EVERY proc that you need to use env. Using the $::env notation is shorter."

Since this is global code anyway (not within a proc) $env should be fine (and is the
style used elsewhere). Go ahead and make that change.

It's true, most of my tcl foo is web search based. :-)

> Yes, with ${board}_download, files are not copied to somewhere else through
> ssh, so the test is faster. One line of comment is added. How about the
> new one?

Looks fine to me. Thanks!

--
Pedro Alves