OLD | NEW |
1 # Copyright 2009-2012 Free Software Foundation, Inc. | 1 # Copyright 2009-2012 Free Software Foundation, Inc. |
2 | 2 |
3 # This program is free software; you can redistribute it and/or modify | 3 # This program is free software; you can redistribute it and/or modify |
4 # it under the terms of the GNU General Public License as published by | 4 # it under the terms of the GNU General Public License as published by |
5 # the Free Software Foundation; either version 3 of the License, or | 5 # the Free Software Foundation; either version 3 of the License, or |
6 # (at your option) any later version. | 6 # (at your option) any later version. |
7 # | 7 # |
8 # This program is distributed in the hope that it will be useful, | 8 # This program is distributed in the hope that it will be useful, |
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of | 9 # but WITHOUT ANY WARRANTY; without even the implied warranty of |
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | 10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
11 # GNU General Public License for more details. | 11 # GNU General Public License for more details. |
12 # | 12 # |
13 # You should have received a copy of the GNU General Public License | 13 # You should have received a copy of the GNU General Public License |
14 # along with this program. If not, see <http://www.gnu.org/licenses/>. | 14 # along with this program. If not, see <http://www.gnu.org/licenses/>. |
15 | 15 |
16 # Test multi-exec / multi-process features that work for all configurations, | 16 # Test multi-exec / multi-process features that work for all configurations, |
17 # even ones that cannot run multiple processes simultaneously. | 17 # even ones that cannot run multiple processes simultaneously. |
18 | 18 |
19 set testfile "base" | 19 set testfile "base" |
20 | 20 |
21 set exec1 "hello" | 21 set exec1 "hello" |
22 set srcfile1 ${exec1}.c | 22 set srcfile1 ${exec1}.c |
23 set binfile1 ${objdir}/${subdir}/${exec1} | 23 set binfile1 [standard_output_file ${exec1}] |
24 | 24 |
25 set exec2 "hangout" | 25 set exec2 "hangout" |
26 set srcfile2 ${exec2}.c | 26 set srcfile2 ${exec2}.c |
27 set binfile2 ${objdir}/${subdir}/${exec2} | 27 set binfile2 [standard_output_file ${exec2}] |
28 | 28 |
29 set exec3 "goodbye" | 29 set exec3 "goodbye" |
30 set srcfile3 ${exec3}.c | 30 set srcfile3 ${exec3}.c |
31 set binfile3 ${objdir}/${subdir}/${exec3} | 31 set binfile3 [standard_output_file ${exec3}] |
32 | 32 |
33 if { [prepare_for_testing ${testfile}.exp ${exec1} "${srcfile1}" {debug nowarnin
gs}] } { | 33 if { [build_executable ${testfile}.exp ${exec1} "${srcfile1}" {debug nowarnings}
] == -1 } { |
34 return -1 | 34 return -1 |
35 } | 35 } |
36 | 36 |
37 if { [prepare_for_testing ${testfile}.exp ${exec2} "${srcfile2}" {debug nowarnin
gs}] } { | 37 if { [build_executable ${testfile}.exp ${exec2} "${srcfile2}" {debug nowarnings}
] == -1} { |
38 return -1 | 38 return -1 |
39 } | 39 } |
40 | 40 |
41 if { [prepare_for_testing ${testfile}.exp ${exec3} "${srcfile3}" {debug nowarnin
gs}] } { | 41 if { [build_executable ${testfile}.exp ${exec3} "${srcfile3}" {debug nowarnings}
] == -1 } { |
42 return -1 | 42 return -1 |
43 } | 43 } |
44 | 44 |
45 clean_restart ${exec1} | 45 clean_restart ${exec1} |
46 | 46 |
47 # Add an empty inferior space, switch to it, and load a main | 47 # Add an empty inferior space, switch to it, and load a main |
48 # executable into it. | 48 # executable into it. |
49 gdb_test "add-inferior" "Added inferior 2.*" "add empty inferior 2" | 49 gdb_test "add-inferior" "Added inferior 2.*" "add empty inferior 2" |
50 gdb_test "inferior 2" "Switching to inferior 2.*" "switch to inferior 2" | 50 gdb_test "inferior 2" "Switching to inferior 2.*" "switch to inferior 2" |
51 gdb_test "file ${binfile2}" ".*" "load ${exec2} file in inferior 2" | 51 gdb_test "file ${binfile2}" ".*" "load ${exec2} file in inferior 2" |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 -re "$gdb_prompt $" { | 181 -re "$gdb_prompt $" { |
182 if { $see1 && !$see2 && !$see3 } then { | 182 if { $see1 && !$see2 && !$see3 } then { |
183 pass "check remove-inferiors" | 183 pass "check remove-inferiors" |
184 } else { | 184 } else { |
185 fail "check remove-inferiors" | 185 fail "check remove-inferiors" |
186 } | 186 } |
187 } | 187 } |
188 } | 188 } |
189 | 189 |
OLD | NEW |