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

Unified Diff: gdb/testsuite/gdb.xml/tdesc-arch.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.xml/maint_print_struct.xml ('k') | gdb/testsuite/gdb.xml/tdesc-errors.exp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.xml/tdesc-arch.exp
diff --git a/gdb/testsuite/gdb.xml/tdesc-arch.exp b/gdb/testsuite/gdb.xml/tdesc-arch.exp
index 55c23b2c882d764d2e9fb7a03bbe104f18188051..241ad28f9c9d6cb3260fca43f963cd3bdb7ca0ad 100644
--- a/gdb/testsuite/gdb.xml/tdesc-arch.exp
+++ b/gdb/testsuite/gdb.xml/tdesc-arch.exp
@@ -1,4 +1,4 @@
-# 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
@@ -60,17 +60,20 @@ proc set_arch { arch which } {
global gdb_prompt
global subdir
- set fd [open "$subdir/tdesc-arch.xml" w]
+ set filename [standard_output_file tdesc-arch.xml]
+ set fd [open $filename w]
puts $fd \
"<target>
<architecture>$arch</architecture>
</target>"
close $fd
- remote_download host "${subdir}/tdesc-arch.xml" "tdesc-arch.xml"
+ if {[is_remote host]} {
+ set filename [remote_download host $filename tdesc-arch.xml]
+ }
# Anchor the test output, so that error messages are detected.
- set cmd "set tdesc filename tdesc-arch.xml"
- set msg "$cmd ($which architecture)"
+ set cmd "set tdesc filename $filename"
+ set msg "set tdesc filename tdesc-arch.xml ($which architecture)"
set cmd_regex [string_to_regexp $cmd]
gdb_test_multiple $cmd $msg {
-re "^$cmd_regex\r\n$gdb_prompt $" {
@@ -86,31 +89,32 @@ proc set_arch { arch which } {
"The target architecture is set automatically \\(currently $arch\\)" \
"$cmd ($which architecture)"
- file delete "${subdir}/tdesc-arch.xml"
- remote_file host delete "tdesc-arch.xml"
+ remote_file host delete $filename
}
set_arch $arch1 first
set_arch $arch2 second
# Check an invalid architecture setting.
-set fd [open "${subdir}/tdesc-arch.xml" w]
+set filename [standard_output_file tdesc-arch.xml]
+set fd [open $filename w]
puts $fd \
"<target>
<architecture>invalid</architecture>
</target>"
close $fd
-remote_download host "$subdir/tdesc-arch.xml" "tdesc-arch.xml"
+if {[is_remote host]} {
+ set filename [remote_download host $filename "tdesc-arch.xml"]
+}
-set cmd "set tdesc filename tdesc-arch.xml"
+set cmd "set tdesc filename $filename"
gdb_test $cmd \
"warning:.*Target description specified unknown architecture.*" \
- "$cmd (invalid architecture)"
+ "set tdesc filename tdesc-arch.xml (invalid architecture)"
set cmd "show architecture"
gdb_test $cmd \
"The target architecture is set automatically \\(currently $default_arch\\)" \
"$cmd (invalid architecture)"
-file delete "${subdir}/tdesc-arch.xml"
-remote_file host delete "tdesc-arch.xml"
+remote_file host delete $filename
« no previous file with comments | « gdb/testsuite/gdb.xml/maint_print_struct.xml ('k') | gdb/testsuite/gdb.xml/tdesc-errors.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698