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