Commit | Line | Data |
---|---|---|
28e7fd62 | 1 | # Copyright 2012-2013 Free Software Foundation, Inc. |
5d206025 YQ |
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$ touch ${my_dejagnu_dir}/my-dejagnu.exp | |
21 | # bash$ export DEJAGNU=${my_dejagnu_dir}/my-dejagnu.exp | |
22 | # bash$ mkdir ${my_dejagnu_dir}/boards | |
23 | # bash$ cp ${src_dir}/gdb/testsuite/boards/local-remote-host.exp \ | |
24 | # ${my_dejagnu_dir}/boards | |
25 | ||
26 | # Modify the location of GDB and the username to access your box | |
27 | # below. | |
28 | ||
29 | # bash$ cd ${build_dir}/gdb | |
30 | # bash$ make check RUNTESTFLAGS="--host_board=local-remote-host" | |
31 | ||
32 | global GDB | |
33 | set GDB [file join [pwd] "../gdb"] | |
34 | ||
35 | set_board_info hostname 127.0.0.1 | |
36 | ||
37 | set_board_info username $env(USER) | |
38 | ||
39 | # The ssh key should be correctly set up that you ssh to 127.0.0.1 | |
40 | # without having to type password. | |
41 | set_board_info rsh_prog /usr/bin/ssh | |
42 | set_board_info rcp_prog /usr/bin/scp | |
43 | set_board_info file_transfer "rsh" | |
44 | ||
45 | proc ${board}_download { board src dest } { | |
46 | ||
47 | # If file name is a relative, convert it to absolute, otherwise file can't | |
48 | # be found on host, because the current directory usually is /home/$USER. | |
49 | # This also bypasses the real download to the host. | |
50 | if { [file pathtype $src] == "relative" } { | |
51 | return [file join [pwd] $src] | |
52 | } else { | |
53 | return $src | |
54 | } | |
55 | } |