This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH OBV] 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.  It is obvious.  I'll commit it in two
days if there are no objections.

gdb/testsuite:

2014-05-13  Yao Qi  <yao@codesourcery.com>

	* boards/local-remote-host-notty.exp (${board}_file): New proc.
---
 gdb/testsuite/boards/local-remote-host-notty.exp | 7 +++++++
 1 file changed, 7 insertions(+)

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
-- 
1.9.0


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]