This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

FYI: clean up gdb.pascal


I'm checking this in.

This changes gdb.pascal to use standard_testfile and clean_restart.

Because we have a special gdb_compile_pascal proc, we can't readily
change this directory to use prepare_for_testing.

We could parse the options to prepare_for_testing and look for "pascal",
and then do some extra set-up work; that would work but I haven't
attempted it here.  It didn't seem to be worth the effort considering
that this code is already reasonably "working-directory-clean".

Regtested on x86-64 Fedora 16.

Tom

ChangeLog:
2012-06-25  Tom Tromey  <tromey@redhat.com>

	* gdb.pascal/integers.exp: Use standard_testfile, clean_restart.
	* gdb.pascal/hello.exp: Use standard_testfile, clean_restart.
	* gdb.pascal/gdb11492.exp: Use standard_testfile, clean_restart.
	* gdb.pascal/floats.exp: Use standard_testfile, clean_restart.

Index: gdb.pascal/floats.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.pascal/floats.exp,v
retrieving revision 1.7
diff -u -r1.7 floats.exp
--- gdb.pascal/floats.exp	16 Jan 2012 16:21:51 -0000	1.7
+++ gdb.pascal/floats.exp	25 Jun 2012 20:34:11 -0000
@@ -15,18 +15,15 @@
 
 load_lib "pascal.exp"
 
-set testfile "floats"
-set srcfile ${testfile}.pas
-set binfile ${objdir}/${subdir}/${testfile}$EXEEXT
+standard_testfile .pas
 
 if {[gdb_compile_pascal "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
-  return -1
+    untested $testfile.exp
+    return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${testfile}
+
 set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
 set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
 
Index: gdb.pascal/gdb11492.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.pascal/gdb11492.exp,v
retrieving revision 1.5
diff -u -r1.5 gdb11492.exp
--- gdb.pascal/gdb11492.exp	16 Jan 2012 16:21:52 -0000	1.5
+++ gdb.pascal/gdb11492.exp	25 Jun 2012 20:34:11 -0000
@@ -15,18 +15,14 @@
 
 load_lib "pascal.exp"
 
-set testfile "gdb11492"
-set srcfile ${testfile}.pas
-set binfile ${objdir}/${subdir}/${testfile}$EXEEXT
+standard_testfile .pas
 
 if {[gdb_compile_pascal "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
-  return -1
+    untested $testfile.exp
+    return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${testfile}
 set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
 
 if { [gdb_breakpoint ${srcfile}:${bp_location1}] } {
Index: gdb.pascal/hello.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.pascal/hello.exp,v
retrieving revision 1.8
diff -u -r1.8 hello.exp
--- gdb.pascal/hello.exp	16 Jan 2012 16:21:52 -0000	1.8
+++ gdb.pascal/hello.exp	25 Jun 2012 20:34:11 -0000
@@ -15,18 +15,13 @@
 
 load_lib "pascal.exp"
 
-set testfile "hello"
-set srcfile ${testfile}.pas
-set binfile ${objdir}/${subdir}/${testfile}${EXEEXT}
+standard_testfile .pas
 
 if {[gdb_compile_pascal "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${testfile}
 set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
 set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
 
Index: gdb.pascal/integers.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.pascal/integers.exp,v
retrieving revision 1.6
diff -u -r1.6 integers.exp
--- gdb.pascal/integers.exp	16 Jan 2012 16:21:52 -0000	1.6
+++ gdb.pascal/integers.exp	25 Jun 2012 20:34:11 -0000
@@ -15,18 +15,13 @@
 
 load_lib "pascal.exp"
 
-set testfile "integers"
-set srcfile ${testfile}.pas
-set binfile ${objdir}/${subdir}/${testfile}$EXEEXT
+standard_testfile .pas
 
 if {[gdb_compile_pascal "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable [list debug ]] != "" } {
   return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${testfile}
 set bp_location1 [gdb_get_line_number "set breakpoint 1 here"]
 set bp_location2 [gdb_get_line_number "set breakpoint 2 here"]
 


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]