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

Side by Side Diff: gdb/testsuite/gdb.base/a2-run.exp

Issue 11969036: Merge GDB 7.5.1 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@master
Patch Set: Created 7 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 unified diff | Download patch
« no previous file with comments | « gdb/testsuite/gdb.base/Makefile.in ('k') | gdb/testsuite/gdb.base/advance.exp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 1988, 1990-1992, 1994-1997, 1999-2000, 2007-2012 Free 1 # Copyright 1988, 1990-1992, 1994-1997, 1999-2000, 2007-2012 Free
2 # Software Foundation, Inc. 2 # Software Foundation, Inc.
3 3
4 # This program is free software; you can redistribute it and/or modify 4 # This program is free software; you can redistribute it and/or modify
5 # it under the terms of the GNU General Public License as published by 5 # it under the terms of the GNU General Public License as published by
6 # the Free Software Foundation; either version 3 of the License, or 6 # the Free Software Foundation; either version 3 of the License, or
7 # (at your option) any later version. 7 # (at your option) any later version.
8 # 8 #
9 # This program is distributed in the hope that it will be useful, 9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of 10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 # GNU General Public License for more details. 12 # GNU General Public License for more details.
13 # 13 #
14 # You should have received a copy of the GNU General Public License 14 # You should have received a copy of the GNU General Public License
15 # along with this program. If not, see <http://www.gnu.org/licenses/>. 15 # along with this program. If not, see <http://www.gnu.org/licenses/>.
16 16
17 # This file was written by Rob Savoye. (rob@cygnus.com) 17 # This file was written by Rob Savoye. (rob@cygnus.com)
18 18
19 # Can't do this test without stdio support. 19 # Can't do this test without stdio support.
20 if [gdb_skip_stdio_test "a2run.exp"] { 20 if [gdb_skip_stdio_test "a2run.exp"] {
21 return 21 return
22 } 22 }
23 23
24 if $tracelevel then {
25 strace $tracelevel
26 }
27
28 # 24 #
29 # test running programs 25 # test running programs
30 # 26 #
31 27
32 set testfile a2-run 28 set testfile a2-run
33 if { [prepare_for_testing ${testfile}.exp $testfile run.c] } { 29 if { [prepare_for_testing ${testfile}.exp $testfile run.c] } {
34 return -1 30 return -1
35 } 31 }
36 32
37 # Run with no arguments. 33 # Run with no arguments.
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
104 pass "run \"$testfile\" with arg" 100 pass "run \"$testfile\" with arg"
105 } 101 }
106 timeout { 102 timeout {
107 fail "(timeout) run \"$testfile\" with arg" 103 fail "(timeout) run \"$testfile\" with arg"
108 } 104 }
109 } 105 }
110 set timeout 10 106 set timeout 10
111 verbose "Timeout is now $timeout seconds" 2 107 verbose "Timeout is now $timeout seconds" 2
112 gdb_expect -re "$gdb_prompt $" {} 108 gdb_expect -re "$gdb_prompt $" {}
113 } else { 109 } else {
114 » setup_xfail "mips-idt-*" "arm-*-coff" 110 » setup_xfail "arm-*-coff"
115 gdb_run_cmd 5 111 gdb_run_cmd 5
116 gdb_expect { 112 gdb_expect {
117 -re ".*120.*$gdb_prompt $"\ 113 -re ".*120.*$gdb_prompt $"\
118 { pass "run \"$testfile\" with arg" } 114 { pass "run \"$testfile\" with arg" }
119 -re ".*$gdb_prompt $" { fail "run \"$testfile\" with arg" } 115 -re ".*$gdb_prompt $" { fail "run \"$testfile\" with arg" }
120 timeout { fail "(timeout) run \"$testfile\" with arg" } 116 timeout { fail "(timeout) run \"$testfile\" with arg" }
121 } 117 }
122 } 118 }
123 119
124 # Run again with same arguments. 120 # Run again with same arguments.
125 setup_xfail "mips-idt-*"
126 gdb_run_cmd 121 gdb_run_cmd
127 122
128 if [istarget "*-*-vxworks*"] then { 123 if [istarget "*-*-vxworks*"] then {
129 set timeout 120 124 set timeout 120
130 verbose "Timeout is now $timeout seconds" 2 125 verbose "Timeout is now $timeout seconds" 2
131 gdb_expect { 126 gdb_expect {
132 "$inferior_exited_re normally" { 127 "$inferior_exited_re normally" {
133 unresolved "run \"$testfile\" again with same args" 128 unresolved "run \"$testfile\" again with same args"
134 } 129 }
135 "120" { pass "run \"$testfile\" again with same args" } 130 "120" { pass "run \"$testfile\" again with same args" }
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 -re ".*$gdb_prompt $" { 177 -re ".*$gdb_prompt $" {
183 fail "run after setting args to nil" 178 fail "run after setting args to nil"
184 } 179 }
185 timeout { 180 timeout {
186 fail "(timeout) run after setting args to nil" 181 fail "(timeout) run after setting args to nil"
187 } 182 }
188 } 183 }
189 } 184 }
190 185
191 # Use "set args" command to specify an argument and run again. 186 # Use "set args" command to specify an argument and run again.
192 setup_xfail "mips-idt-*"
193 if [istarget "*-*-vxworks*"] then { 187 if [istarget "*-*-vxworks*"] then {
194 gdb_test_no_output "set args vxmain \"6\"" 188 gdb_test_no_output "set args vxmain \"6\""
195 } else { 189 } else {
196 gdb_test_no_output "set args 6" 190 gdb_test_no_output "set args 6"
197 } 191 }
198 192
199 gdb_run_cmd 193 gdb_run_cmd
200 194
201 if [istarget "*-*-vxworks*"] then { 195 if [istarget "*-*-vxworks*"] then {
202 set timeout 120 196 set timeout 120
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 if ![is_remote target] then { 229 if ![is_remote target] then {
236 gdb_test "run `echo 8`" \ 230 gdb_test "run `echo 8`" \
237 "Starting program.*40320.*" \ 231 "Starting program.*40320.*" \
238 "run \"$testfile\" with shell" 232 "run \"$testfile\" with shell"
239 } 233 }
240 234
241 # Reset the default arguments for VxWorks 235 # Reset the default arguments for VxWorks
242 if [istarget "*-*-vxworks*"] then { 236 if [istarget "*-*-vxworks*"] then {
243 gdb_test_no_output "set args main" 237 gdb_test_no_output "set args main"
244 } 238 }
OLDNEW
« no previous file with comments | « gdb/testsuite/gdb.base/Makefile.in ('k') | gdb/testsuite/gdb.base/advance.exp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698