use prepare_for_testing in gdb.python/py-frame.exp
authorJoel Brobecker <brobecker@gnat.com>
Sat, 26 Feb 2011 14:06:28 +0000 (14:06 +0000)
committerJoel Brobecker <brobecker@gnat.com>
Sat, 26 Feb 2011 14:06:28 +0000 (14:06 +0000)
gdb/testsuite/ChangeLog:

        * gdb.python/py-frame.exp: Simplify the initialization phase
        using prepare_for_testing.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.python/py-frame.exp

index 8e262912d2f518fa859449ce87e0f8e16aa3dadd..7096c0e6fd6cb49de413f8479d1a57560d209ca9 100644 (file)
@@ -1,3 +1,8 @@
+2011-02-26  Joel Brobecker  <brobecker@adacore.com>
+
+       * gdb.python/py-frame.exp: Simplify the initialization phase
+       using prepare_for_testing.
+
 2011-02-25  Michael Snyder  <msnyder@vmware.com>
 
        * gdb.multi/base.exp: Add tests for info inferiors with args.
index e3b56292f10dd2a201610b6dc50decfe64e5a7ee..1cb573eb7a174d077f44c374d4dbbb3c0e74ea85 100644 (file)
@@ -24,19 +24,10 @@ load_lib gdb-python.exp
 
 set testfile "py-frame"
 set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] } {
     return -1
 }
 
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 # Skip all tests if Python scripting is not enabled.
 if { [skip_python_tests] } { continue }