]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
gdb/testsuite/
authorJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 26 Jan 2013 18:43:43 +0000 (18:43 +0000)
committerJan Kratochvil <jan.kratochvil@redhat.com>
Sat, 26 Jan 2013 18:43:43 +0000 (18:43 +0000)
Code cleanup.
* gdb.base/restore.exp: Replace gdb_compile, gdb_exit, gdb_start,
gdb_reinitialize_dir and gdb_load by standard_testfile, set executable
and prepare_for_testing.
* gdb.base/store.exp: Likewise.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/restore.exp
gdb/testsuite/gdb.base/store.exp

index 2a04ca84aca7f71ff2aea1fc37b375ea415233df..47ea81443bf2e87a8dbbdf37edbfdb6f1cf94640 100644 (file)
@@ -1,3 +1,11 @@
+2013-01-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
+
+       Code cleanup.
+       * gdb.base/restore.exp: Replace gdb_compile, gdb_exit, gdb_start,
+       gdb_reinitialize_dir and gdb_load by standard_testfile, set executable
+       and prepare_for_testing.
+       * gdb.base/store.exp: Likewise.
+
 2013-01-25  Tom Tromey  <tromey@redhat.com>
 
        * gdb.python/py-explore.exp: Expect the gdb prompt.
index 772faca7081029d506347a6db0f2c0c053e9f060..dbe01dc451199cba80c35de0ea262a7bae0034da 100644 (file)
 # This file was written by Jim Blandy <jimb@cygnus.com>, with
 # fragments borrowed from return.exp.
 
+standard_testfile
+set executable $testfile
 
-set testfile "restore"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested restore.exp
+if { [prepare_for_testing $testfile.exp $executable $srcfile] } {
     return -1
 }
 
@@ -97,15 +95,6 @@ proc restore_tests { } {
     }
 }
 
-
-
-# Start with a fresh gdb.
-
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 set prev_timeout $timeout
 set timeout 30
 restore_tests
index fb6a6a669c9d4087e07bf9173c3581778f0d8526..292a319613177453018f6e5c8a91e1e04c833712 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-#
-# test running programs
-#
+standard_testfile
+set executable $testfile
 
-set testfile "store"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested store.exp
+if { [prepare_for_testing $testfile.exp $executable $srcfile] } {
     return -1
 }
 
@@ -31,11 +26,6 @@ if [get_compiler_info] {
     return -1;
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 #
 # set it up at a breakpoint so we can play with the variable values
 #