From f23fcd46a7ca34bf466de9164780a78d38729ff7 Mon Sep 17 00:00:00 2001 From: Yao Qi Date: Tue, 13 May 2014 09:37:54 +0800 Subject: [PATCH] Overwrite ${board}_file in local-remote-host After I run test like this, $ make check RUNTESTFLAGS='--host_board=local-remote-host dw2-basic.exp' gdb.dwarf2/file1.txt in source tree was removed. In some gdb.dwarf2/*.exp, file1.txt is copied to host and then removed at the end. However, in local-remote-host-notty.exp, ${board}_download doesn't copy the file but return the absolute path of the src file. 'remote_file host delete' at the end will remove the file in source tree. This patch is to overwrite ${board}_file, and specially make "delete" option do nothing. This approach is used in gdbserver-base.exp and remote-stdio-gdbserver.exp too. gdb/testsuite: 2014-05-14 Yao Qi * boards/local-remote-host-notty.exp (${board}_file): New proc. --- gdb/testsuite/ChangeLog | 5 +++++ gdb/testsuite/boards/local-remote-host-notty.exp | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index ce0b72f..e3343ae 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-05-14 Yao Qi + + * boards/local-remote-host-notty.exp (${board}_file): New + proc. + 2014-05-07 Kyle McMartin Pushed by Joel Brobecker . diff --git a/gdb/testsuite/boards/local-remote-host-notty.exp b/gdb/testsuite/boards/local-remote-host-notty.exp index 6ff8f18..dd3ee5a 100644 --- a/gdb/testsuite/boards/local-remote-host-notty.exp +++ b/gdb/testsuite/boards/local-remote-host-notty.exp @@ -33,6 +33,13 @@ set_board_info rsh_prog /usr/bin/ssh set_board_info rcp_prog /usr/bin/scp set_board_info file_transfer "rsh" +proc ${board}_file { dest op args } { + if { $op == "delete" } { + return 0 + } + return [eval [list standard_file $dest $op] $args] +} + proc ${board}_download { board src dest } { # If file name is a relative, convert it to absolute, otherwise file can't -- 2.7.4