diff options
Diffstat (limited to 'gdb/testsuite/gdb.base/term.exp')
-rw-r--r-- | gdb/testsuite/gdb.base/term.exp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/gdb/testsuite/gdb.base/term.exp b/gdb/testsuite/gdb.base/term.exp index 84d60e3..be550f0 100644 --- a/gdb/testsuite/gdb.base/term.exp +++ b/gdb/testsuite/gdb.base/term.exp @@ -12,7 +12,7 @@ # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software -# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # Please email any bugs, comments, and/or additions to this file to: # bug-gdb@prep.ai.mit.edu @@ -25,7 +25,6 @@ if $tracelevel then { # This only works for native, I think. if ![isnative] then { - warning "Term test case can't run on a target system." continue } @@ -35,15 +34,17 @@ if ![isnative] then { set prms_id 0 set bug_id 0 -set binfile "run" - -if ![file exists $objdir/$subdir/$binfile] then { - perror "$objdir/$subdir/$binfile does not exist." - return 0 +set testfile "run" +set srcfile ${srcdir}/$subdir/${testfile}.c +set binfile ${objdir}/${subdir}/${testfile} +if { [compile "${srcfile} -g -o ${binfile}"] != "" } { + perror "Couldn't compile ${srcfile}" + return -1 } +delete_breakpoints gdb_reinitialize_dir $srcdir/$subdir -gdb_load $objdir/$subdir/$binfile +gdb_load ${binfile} # Test that GDB correctly identifies that it does not control a terminal. send "info terminal\n" |