Home | History | Annotate | Line # | Download | only in boards
local-remote-host.exp revision 1.1
      1  1.1  christos # Copyright 2012-2014 Free Software Foundation, Inc.
      2  1.1  christos 
      3  1.1  christos # This program is free software; you can redistribute it and/or modify
      4  1.1  christos # it under the terms of the GNU General Public License as published by
      5  1.1  christos # the Free Software Foundation; either version 3 of the License, or
      6  1.1  christos # (at your option) any later version.
      7  1.1  christos #
      8  1.1  christos # This program is distributed in the hope that it will be useful,
      9  1.1  christos # but WITHOUT ANY WARRANTY; without even the implied warranty of
     10  1.1  christos # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     11  1.1  christos # GNU General Public License for more details.
     12  1.1  christos #
     13  1.1  christos # You should have received a copy of the GNU General Public License
     14  1.1  christos # along with this program.  If not, see <http://www.gnu.org/licenses/>.
     15  1.1  christos 
     16  1.1  christos # This file is a dejagnu "board file" and is used to run the testsuite
     17  1.1  christos # against local host, in remote host mode.
     18  1.1  christos #
     19  1.1  christos # To use this file:
     20  1.1  christos # bash$ cd ${build_dir}/gdb
     21  1.1  christos # bash$ make check RUNTESTFLAGS="--host_board=local-remote-host"
     22  1.1  christos 
     23  1.1  christos global GDB
     24  1.1  christos set GDB [file join [pwd] "../gdb"]
     25  1.1  christos 
     26  1.1  christos set_board_info hostname 127.0.0.1
     27  1.1  christos 
     28  1.1  christos set_board_info username $env(USER)
     29  1.1  christos 
     30  1.1  christos # The ssh key should be correctly set up that you ssh to 127.0.0.1
     31  1.1  christos # without having to type password.
     32  1.1  christos set_board_info rsh_prog /usr/bin/ssh
     33  1.1  christos set_board_info rcp_prog /usr/bin/scp
     34  1.1  christos set_board_info file_transfer "rsh"
     35  1.1  christos 
     36  1.1  christos proc ${board}_download { board src dest } {
     37  1.1  christos 
     38  1.1  christos     # If file name is a relative, convert it to absolute, otherwise file can't
     39  1.1  christos     # be found on host, because the current directory usually is /home/$USER.
     40  1.1  christos     # This also bypasses the real download to the host.
     41  1.1  christos     if { [file pathtype $src] == "relative" } {
     42  1.1  christos 	return [file join [pwd] $src]
     43  1.1  christos     } else {
     44  1.1  christos 	return $src
     45  1.1  christos     }
     46  1.1  christos }
     47