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

Unified Diff: gdb/testsuite/gdb.mi/mi-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.mi/mi-file.exp ('k') | gdb/testsuite/gdb.mi/mi-fill-memory.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.mi/mi-file-transfer.exp
diff --git a/gdb/testsuite/gdb.mi/mi-file-transfer.exp b/gdb/testsuite/gdb.mi/mi-file-transfer.exp
index a7a3e60a2ff73edbe932cc08ecc28a13fdb6c448..dbf0d6635d25027f1cc9bd3b3564baa35e901ccd 100644
--- a/gdb/testsuite/gdb.mi/mi-file-transfer.exp
+++ b/gdb/testsuite/gdb.mi/mi-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
@@ -54,15 +54,27 @@ proc mi_gdbserver_run { } {
}
proc test_file_transfer { filename description } {
- mi_gdb_test "-target-file-put \"$filename\" \"down-server\"" \
+ # If we are running everything locally, then we want to be sure to
+ # put the files into the test's standard output location. On the
+ # other hand, if the host or target is remote, then we need to
+ # continue with the "old-style" directory-less approach.
+ if {![is_remote host] && ![is_remote target]} {
+ set up_server [standard_output_file up-server]
+ set down_server [standard_output_file down-server]
+ } else {
+ set up_server up-server
+ set down_server down-server
+ }
+
+ mi_gdb_test "-target-file-put \"$filename\" \"${down_server}\"" \
"\\^done" "put $description"
- mi_gdb_test "-target-file-get \"down-server\" \"up-server\"" \
+ mi_gdb_test "-target-file-get \"${down_server}\" \"${up_server}\"" \
"\\^done" "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 {
@@ -70,25 +82,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"
}
- mi_gdb_test "-target-file-delete \"down-server\"" \
+ mi_gdb_test "-target-file-delete \"${down_server}\"" \
"\\^done" "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} }
}
mi_gdbserver_run
« no previous file with comments | « gdb/testsuite/gdb.mi/mi-file.exp ('k') | gdb/testsuite/gdb.mi/mi-fill-memory.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698