Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(322)

Unified Diff: gdb/testsuite/gdb.server/file-transfer.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.server/ext-run.exp ('k') | gdb/testsuite/gdb.server/no-thread-db.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.server/file-transfer.exp
diff --git a/gdb/testsuite/gdb.server/file-transfer.exp b/gdb/testsuite/gdb.server/file-transfer.exp
index c5455efc09505b795940e8dd4a74ab02c2f5fdb5..841d75732a30a430355162186d5024510864574a 100644
--- a/gdb/testsuite/gdb.server/file-transfer.exp
+++ b/gdb/testsuite/gdb.server/file-transfer.exp
@@ -1,5 +1,5 @@
# This testcase is part of GDB, the GNU debugger.
-# Copyright 2007-2012 Free Software Foundation, Inc.
+# Copyright 2007-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -35,15 +35,22 @@ gdb_test "disconnect" ".*"
gdbserver_run ""
proc test_file_transfer { filename description } {
- gdb_test "remote put \"$filename\" down-server" \
+ set up_server up-server
+ set down_server down-server
+ if {![is_remote host] && ![is_remote target]} {
+ set up_server [standard_output_file $up_server]
+ set down_server [standard_output_file $down_server]
+ }
+
+ gdb_test "remote put \"$filename\" $down_server" \
"Successfully sent .*" "put $description"
- gdb_test "remote get down-server up-server" \
+ gdb_test "remote get $down_server $up_server" \
"Successfully fetched .*" "get $description"
if { ![is_remote target] } {
# If we can check the target copy of the file, do that too.
# This should catch symmetric errors in upload and download.
- set result [remote_exec host "cmp -s $filename down-server"]
+ set result [remote_exec host "cmp -s $filename $down_server"]
if { [lindex $result 0] == 0 } {
pass "compare intermediate $description"
} else {
@@ -51,25 +58,25 @@ proc test_file_transfer { filename description } {
}
}
- set result [remote_exec host "cmp -s $filename up-server"]
+ set result [remote_exec host "cmp -s $filename $up_server"]
if { [lindex $result 0] == 0 } {
pass "compare $description"
} else {
fail "compare $description"
}
- gdb_test "remote delete down-server" \
+ gdb_test "remote delete $down_server" \
"Successfully deleted .*" "deleted $description"
if { ![is_remote target] } {
- if { ! [remote_file target exists down-server] } {
+ if { ! [remote_file target exists $down_server] } {
pass "verified deleted $description"
} else {
fail "verified deleted $description"
}
}
- catch { file delete up-server }
+ catch { file delete $up_server }
}
test_file_transfer "$binfile" "binary file"
« no previous file with comments | « gdb/testsuite/gdb.server/ext-run.exp ('k') | gdb/testsuite/gdb.server/no-thread-db.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698