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: fix up gdb.dwarf2, part one


I'm checking this in.

This applies the test suite cleanup to gdb.dwarf2.

gdb.dwarf2 isn't done, though.  It still builds a bunch of objects in
".", which is not ok.  I have a separate patch coming to clean these up.

Regtested on x86-64 Fedora 16.

Tom

2012-06-27  Tom Tromey  <tromey@redhat.com>

	* gdb.dwarf2/pr10770.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-var-zero-addr.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-param-error.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-op-call.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-inline-param.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.dwarf2/dw2-inline-break.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-ifort-parameter.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-cp-infcall-ref-static.exp: Use
	standard_testfile.
	* gdb.dwarf2/dw2-case-insensitive.exp: Use standard_testfile.
	* gdb.dwarf2/dw4-sig-types.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-objfile-overlap.exp: Use standard_testfile.
	* gdb.dwarf2/callframecfa.exp: Use standard_testfile,
	prepare_for_testing.
	* gdb.dwarf2/dup-psym.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-ada-ffffffff.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-anonymous-func.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-bad-parameter-type.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-basic.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-compressed.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-const.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-cu-size.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-double-set-die-type.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-empty-namespace.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-empty-pc-range.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-filename.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-icc-opaque.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-inheritance.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-intercu.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-intermix.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-linkage-name-trust.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-modula2-self-type.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-namespaceless-anonymous.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-op-stack-value.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-producer.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-ranges.exp: Use standard_testfile,
	standard_output_file.
	* gdb.dwarf2/dw2-ref-missing-frame.exp: Use standard_testfile,
	standard_output_file.
	* gdb.dwarf2/dw2-restore.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-simple-locdesc.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-skip-prologue.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-stack-boundary.exp: Use standard_testfile.
	* gdb.dwarf2/dw2-strp.exp: Use standard_testfile.
	* gdb.dwarf2/dw4-sig-type-unused.exp: Use standard_testfile.
	* gdb.dwarf2/implptr-64bit.exp: Use standard_testfile.
	* gdb.dwarf2/implptr-optimized-out.exp: Use standard_testfile.
	* gdb.dwarf2/implptr.exp: Use standard_testfile.
	* gdb.dwarf2/mac-fileno.exp: Use standard_testfile.
	* gdb.dwarf2/member-ptr-forwardref.exp: Use standard_testfile.
	* gdb.dwarf2/pieces.exp: Use standard_testfile.
	* gdb.dwarf2/pr11465.exp: Use standard_testfile.
	* gdb.dwarf2/pr13961.exp: Use standard_testfile.
	* gdb.dwarf2/valop.exp: Use standard_testfile,
	prepare_for_testing.

Index: gdb.dwarf2/callframecfa.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/callframecfa.exp,v
retrieving revision 1.7
diff -u -r1.7 callframecfa.exp
--- gdb.dwarf2/callframecfa.exp	4 Jan 2012 08:17:49 -0000	1.7
+++ gdb.dwarf2/callframecfa.exp	27 Jun 2012 16:58:20 -0000
@@ -25,20 +25,13 @@
     return 0  
 }
 
-set testfile "callframecfa"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
-       [list {additional_flags=-nostdlib}]] != "" } {
+if {[prepare_for_testing $testname.exp $testname $srcfile \
+	 [list {additional_flags=-nostdlib}]]} {
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 if ![runto_main] {
     return -1
 }
Index: gdb.dwarf2/dup-psym.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dup-psym.exp,v
retrieving revision 1.9
diff -u -r1.9 dup-psym.exp
--- gdb.dwarf2/dup-psym.exp	4 Jan 2012 08:17:51 -0000	1.9
+++ gdb.dwarf2/dup-psym.exp	27 Jun 2012 16:58:20 -0000
@@ -21,9 +21,7 @@
     return 0  
 }
 
-set testfile "dup-psym"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-ada-ffffffff.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-ada-ffffffff.exp,v
retrieving revision 1.4
diff -u -r1.4 dw2-ada-ffffffff.exp
--- gdb.dwarf2/dw2-ada-ffffffff.exp	4 Jan 2012 08:17:51 -0000	1.4
+++ gdb.dwarf2/dw2-ada-ffffffff.exp	27 Jun 2012 16:58:20 -0000
@@ -19,10 +19,8 @@
     return 0  
 }
 
-set testfile "dw2-ada-ffffffff"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-anonymous-func.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-anonymous-func.exp,v
retrieving revision 1.4
diff -u -r1.4 dw2-anonymous-func.exp
--- gdb.dwarf2/dw2-anonymous-func.exp	4 Jan 2012 08:17:51 -0000	1.4
+++ gdb.dwarf2/dw2-anonymous-func.exp	27 Jun 2012 16:58:20 -0000
@@ -21,10 +21,8 @@
     return 0
 }
 
-set testfile "dw2-anonymous-func"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-bad-parameter-type.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-bad-parameter-type.exp,v
retrieving revision 1.4
diff -u -r1.4 dw2-bad-parameter-type.exp
--- gdb.dwarf2/dw2-bad-parameter-type.exp	4 Jan 2012 08:17:51 -0000	1.4
+++ gdb.dwarf2/dw2-bad-parameter-type.exp	27 Jun 2012 16:58:20 -0000
@@ -19,10 +19,8 @@
     return 0  
 }
 
-set testfile "dw2-bad-parameter-type"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
 
 # First try referencing DW_AT_frame_base which is not defined.
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
Index: gdb.dwarf2/dw2-basic.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-basic.exp,v
retrieving revision 1.13
diff -u -r1.13 dw2-basic.exp
--- gdb.dwarf2/dw2-basic.exp	4 Jan 2012 08:17:51 -0000	1.13
+++ gdb.dwarf2/dw2-basic.exp	27 Jun 2012 16:58:20 -0000
@@ -21,10 +21,8 @@
     return 0  
 }
 
-set testfile "dw2-basic"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-case-insensitive.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-case-insensitive.exp,v
retrieving revision 1.3
diff -u -r1.3 dw2-case-insensitive.exp
--- gdb.dwarf2/dw2-case-insensitive.exp	4 Jan 2012 08:17:51 -0000	1.3
+++ gdb.dwarf2/dw2-case-insensitive.exp	27 Jun 2012 16:58:20 -0000
@@ -19,9 +19,10 @@
     return 0  
 }
 
-set testfile "dw2-case-insensitive"
+standard_testfile .c dw2-case-insensitive-debug.S
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.c ${testfile}-debug.S] {nodebug}] } {
+if { [prepare_for_testing ${testfile}.exp ${testfile} \
+	  [list $srcfile $srcfile2] {nodebug}] } {
     return -1
 }
 
Index: gdb.dwarf2/dw2-compressed.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-compressed.exp,v
retrieving revision 1.8
diff -u -r1.8 dw2-compressed.exp
--- gdb.dwarf2/dw2-compressed.exp	4 Jan 2012 08:17:51 -0000	1.8
+++ gdb.dwarf2/dw2-compressed.exp	27 Jun 2012 16:58:20 -0000
@@ -21,10 +21,8 @@
     return 0  
 }
 
-set testfile "dw2-compressed"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main-ndebug.o" object -g0] != "" } {
     return -1
Index: gdb.dwarf2/dw2-const.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-const.exp,v
retrieving revision 1.5
diff -u -r1.5 dw2-const.exp
--- gdb.dwarf2/dw2-const.exp	4 Jan 2012 08:17:51 -0000	1.5
+++ gdb.dwarf2/dw2-const.exp	27 Jun 2012 16:58:20 -0000
@@ -19,9 +19,7 @@
     return 0
 }
 
-set testfile "dw2-const"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
@@ -35,7 +33,7 @@
     return -1
 }
 
-clean_restart ${testfile}.x
+clean_restart ${testfile}
 
 gdb_test "print twelve" "= 12"
 
Index: gdb.dwarf2/dw2-cp-infcall-ref-static.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-cp-infcall-ref-static.exp,v
retrieving revision 1.4
diff -u -r1.4 dw2-cp-infcall-ref-static.exp
--- gdb.dwarf2/dw2-cp-infcall-ref-static.exp	4 Jan 2012 08:17:51 -0000	1.4
+++ gdb.dwarf2/dw2-cp-infcall-ref-static.exp	27 Jun 2012 16:58:20 -0000
@@ -25,8 +25,10 @@
     return 0  
 }
 
-set testfile "dw2-cp-infcall-ref-static"
-if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}-main.c ${testfile}.S] {}] } {
+standard_testfile .S dw2-cp-infcall-ref-static-main.c
+
+if { [prepare_for_testing ${testfile}.exp ${testfile} \
+	  [list $srcfile2 $srcfile] {}] } {
     return -1
 }
 
Index: gdb.dwarf2/dw2-cu-size.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-cu-size.exp,v
retrieving revision 1.6
diff -u -r1.6 dw2-cu-size.exp
--- gdb.dwarf2/dw2-cu-size.exp	4 Jan 2012 08:17:51 -0000	1.6
+++ gdb.dwarf2/dw2-cu-size.exp	27 Jun 2012 16:58:20 -0000
@@ -24,9 +24,7 @@
     return 0  
 }
 
-set testfile "dw2-cu-size"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-double-set-die-type.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-double-set-die-type.exp,v
retrieving revision 1.4
diff -u -r1.4 dw2-double-set-die-type.exp
--- gdb.dwarf2/dw2-double-set-die-type.exp	4 Jan 2012 08:17:51 -0000	1.4
+++ gdb.dwarf2/dw2-double-set-die-type.exp	27 Jun 2012 16:58:20 -0000
@@ -22,15 +22,12 @@
     return 0  
 }
 
-set testfile "dw2-double-set-die-type"
-set srcfile "$testfile.S"
-set executable "$testfile.x"
+standard_testfile .S
 
-if  { [gdb_compile [file join $srcdir $subdir $srcfile] \
-	   [file join $objdir $subdir $executable] \
+if  { [gdb_compile [file join $srcdir $subdir $srcfile] $binfile \
 	   object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 gdb_test "ptype a" "type = class .*"
Index: gdb.dwarf2/dw2-empty-namespace.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-empty-namespace.exp,v
retrieving revision 1.4
diff -u -r1.4 dw2-empty-namespace.exp
--- gdb.dwarf2/dw2-empty-namespace.exp	4 Jan 2012 08:17:51 -0000	1.4
+++ gdb.dwarf2/dw2-empty-namespace.exp	27 Jun 2012 16:58:20 -0000
@@ -21,15 +21,14 @@
     return 0  
 }
 
-set testfile "dw2-empty-namespace"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } {
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
+	   object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 # `p var' below can work without identified DWARF DIE just based on its ELF symbol.
 # Catch it here as `type = <data variable, no debug info>'.
Index: gdb.dwarf2/dw2-empty-pc-range.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-empty-pc-range.exp,v
retrieving revision 1.2
diff -u -r1.2 dw2-empty-pc-range.exp
--- gdb.dwarf2/dw2-empty-pc-range.exp	4 Jan 2012 08:17:51 -0000	1.2
+++ gdb.dwarf2/dw2-empty-pc-range.exp	27 Jun 2012 16:58:20 -0000
@@ -19,10 +19,8 @@
     return 0  
 }
 
-set testfile "dw2-empty-pc-range"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-filename.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-filename.exp,v
retrieving revision 1.5
diff -u -r1.5 dw2-filename.exp
--- gdb.dwarf2/dw2-filename.exp	4 Jan 2012 08:17:51 -0000	1.5
+++ gdb.dwarf2/dw2-filename.exp	27 Jun 2012 16:58:20 -0000
@@ -21,15 +21,13 @@
     return 0
 }
 
-set testfile "dw2-filename"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart ${testfile}.x
+clean_restart ${testfile}
 
 # Verify that -file-list-exec-source-files returns a list where
 # the "file" is "file1.txt" (file base name), and "fullname" is
Index: gdb.dwarf2/dw2-icc-opaque.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-icc-opaque.exp,v
retrieving revision 1.1
diff -u -r1.1 dw2-icc-opaque.exp
--- gdb.dwarf2/dw2-icc-opaque.exp	24 May 2012 22:09:21 -0000	1.1
+++ gdb.dwarf2/dw2-icc-opaque.exp	27 Jun 2012 16:58:20 -0000
@@ -23,10 +23,8 @@
     return 0
 }
 
-set testfile "dw2-icc-opaque"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-ifort-parameter.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-ifort-parameter.exp,v
retrieving revision 1.4
diff -u -r1.4 dw2-ifort-parameter.exp
--- gdb.dwarf2/dw2-ifort-parameter.exp	29 Apr 2012 06:40:02 -0000	1.4
+++ gdb.dwarf2/dw2-ifort-parameter.exp	27 Jun 2012 16:58:20 -0000
@@ -22,9 +22,10 @@
     return 0
 }
 
-set testfile "dw2-ifort-parameter"
+standard_testfile .c dw2-ifort-parameter-debug.S
 
-if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.c ${testfile}-debug.S] {nodebug}] } {
+if { [prepare_for_testing ${testfile}.exp ${testfile} \
+	  [list $srcfile $srcfile2] {nodebug}] } {
     return -1
 }
 
Index: gdb.dwarf2/dw2-inheritance.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-inheritance.exp,v
retrieving revision 1.5
diff -u -r1.5 dw2-inheritance.exp
--- gdb.dwarf2/dw2-inheritance.exp	4 Jan 2012 08:17:51 -0000	1.5
+++ gdb.dwarf2/dw2-inheritance.exp	27 Jun 2012 16:58:20 -0000
@@ -22,14 +22,13 @@
     return 0  
 }
 
-set testfile "dw2-inheritance"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } {
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
+	   object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 gdb_test "ptype inherited" "type = class inherited .*"
Index: gdb.dwarf2/dw2-inline-break.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-inline-break.exp,v
retrieving revision 1.1
diff -u -r1.1 dw2-inline-break.exp
--- gdb.dwarf2/dw2-inline-break.exp	16 Mar 2012 16:47:33 -0000	1.1
+++ gdb.dwarf2/dw2-inline-break.exp	27 Jun 2012 16:58:20 -0000
@@ -29,9 +29,10 @@
 }
 
 set basename "inline-break"
-set testfile "dw2-$basename"
 
-if { [prepare_for_testing $testfile.exp $testfile $testfile.S {nodebug}] } {
+standard_testfile .S
+
+if { [prepare_for_testing $testfile.exp $testfile $srcfile {nodebug}] } {
     return -1
 }
 
Index: gdb.dwarf2/dw2-inline-param.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-inline-param.exp,v
retrieving revision 1.7
diff -u -r1.7 dw2-inline-param.exp
--- gdb.dwarf2/dw2-inline-param.exp	4 Jan 2012 08:17:51 -0000	1.7
+++ gdb.dwarf2/dw2-inline-param.exp	27 Jun 2012 16:58:20 -0000
@@ -19,14 +19,13 @@
     return 0  
 }
 
-set testfile dw2-inline-param
-set binfile ${objdir}/${subdir}/${testfile}
-if { [build_executable ${testfile}.exp "${testfile}" [list ${testfile}-main.c ${testfile}.S] {nodebug}] } {
+standard_testfile .S dw2-inline-param-main.c
+
+if { [prepare_for_testing ${testfile}.exp "${testfile}" \
+	  [list $srcfile2 $srcfile] {nodebug}] } {
     return -1
 }
 
-clean_restart ${testfile}
-
 set break_at ""
 set test "info addr break_at"
 gdb_test_multiple $test $test {
Index: gdb.dwarf2/dw2-intercu.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-intercu.exp,v
retrieving revision 1.13
diff -u -r1.13 dw2-intercu.exp
--- gdb.dwarf2/dw2-intercu.exp	28 Apr 2012 23:22:14 -0000	1.13
+++ gdb.dwarf2/dw2-intercu.exp	27 Jun 2012 16:58:20 -0000
@@ -21,10 +21,8 @@
     return 0  
 }
 
-set testfile "dw2-intercu"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-intermix.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-intermix.exp,v
retrieving revision 1.11
diff -u -r1.11 dw2-intermix.exp
--- gdb.dwarf2/dw2-intermix.exp	4 Jan 2012 08:17:51 -0000	1.11
+++ gdb.dwarf2/dw2-intermix.exp	27 Jun 2012 16:58:20 -0000
@@ -21,10 +21,8 @@
     return 0  
 }
 
-set testfile "dw2-intermix"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-linkage-name-trust.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-linkage-name-trust.exp,v
retrieving revision 1.2
diff -u -r1.2 dw2-linkage-name-trust.exp
--- gdb.dwarf2/dw2-linkage-name-trust.exp	4 Jan 2012 08:17:51 -0000	1.2
+++ gdb.dwarf2/dw2-linkage-name-trust.exp	27 Jun 2012 16:58:20 -0000
@@ -25,9 +25,8 @@
     return 0  
 }
 
-set testfile "dw2-linkage-name-trust"
+standard_testfile
 set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}
 if { [gdb_compile ${srcdir}/${subdir}/${testfile}-main.cc "${objdir}/${subdir}/${testfile}-main.o" object {c++ debug}] != ""
      || [gdb_compile "${srcdir}/${subdir}/${testfile}.S" "${objdir}/${subdir}/${testfile}.o" object {}] != ""
      || [gdb_compile "${objdir}/${subdir}/${testfile}-main.o ${objdir}/${subdir}/${testfile}.o" "${binfile}" executable {c++}] != "" } {
Index: gdb.dwarf2/dw2-modula2-self-type.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-modula2-self-type.exp,v
retrieving revision 1.4
diff -u -r1.4 dw2-modula2-self-type.exp
--- gdb.dwarf2/dw2-modula2-self-type.exp	4 Jan 2012 08:17:51 -0000	1.4
+++ gdb.dwarf2/dw2-modula2-self-type.exp	27 Jun 2012 16:58:20 -0000
@@ -19,17 +19,14 @@
     return 0  
 }
 
-set testfile "dw2-modula2-self-type"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
 
 # First try referencing DW_AT_frame_base which is not defined.
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 # C language would just naively print:
 # type = void (*)(void (*)(void (*)(void (*)(void (*)(...
Index: gdb.dwarf2/dw2-namespaceless-anonymous.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-namespaceless-anonymous.exp,v
retrieving revision 1.1
diff -u -r1.1 dw2-namespaceless-anonymous.exp
--- gdb.dwarf2/dw2-namespaceless-anonymous.exp	14 Jan 2012 10:46:35 -0000	1.1
+++ gdb.dwarf2/dw2-namespaceless-anonymous.exp	27 Jun 2012 16:58:20 -0000
@@ -19,15 +19,14 @@
     return 0  
 }
 
-set testfile "dw2-namespaceless-anonymous"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } {
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
+	   object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 gdb_test "ptype '(anonymous namespace)::v'" "type = myint"
 gdb_test "p '(anonymous namespace)::v'" " = 1"
Index: gdb.dwarf2/dw2-objfile-overlap.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-objfile-overlap.exp,v
retrieving revision 1.2
diff -u -r1.2 dw2-objfile-overlap.exp
--- gdb.dwarf2/dw2-objfile-overlap.exp	4 Jan 2012 08:17:51 -0000	1.2
+++ gdb.dwarf2/dw2-objfile-overlap.exp	27 Jun 2012 16:58:20 -0000
@@ -19,12 +19,13 @@
     return 0  
 }
 
-set testfile "dw2-objfile-overlap"
+standard_testfile
+
 set srcfile_outer ${testfile}-outer.S
 set srcfile_inner ${testfile}-inner.S
 set executable_outer ${testfile}-outer.x
-set binfile_outer ${objdir}/${subdir}/${executable_outer}
-set binfile_inner ${objdir}/${subdir}/${testfile}-inner.x
+set binfile_outer ${binfile}-outer.x
+set binfile_inner ${binfile}-inner.x
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile_outer}" "${binfile_outer}" \
       object {}] != ""
Index: gdb.dwarf2/dw2-op-call.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-op-call.exp,v
retrieving revision 1.6
diff -u -r1.6 dw2-op-call.exp
--- gdb.dwarf2/dw2-op-call.exp	4 Jan 2012 08:17:51 -0000	1.6
+++ gdb.dwarf2/dw2-op-call.exp	27 Jun 2012 16:58:20 -0000
@@ -21,8 +21,10 @@
     return 0   
 }
 
-set testfile "dw2-op-call"
-if { [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.S main.c] {nodebug}] } {
+standard_testfile .S main.c
+
+if { [prepare_for_testing ${testfile}.exp ${testfile} \
+	  [list $srcfile $srcfile2] {nodebug}] } {
     return -1
 }
 
Index: gdb.dwarf2/dw2-op-stack-value.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-op-stack-value.exp,v
retrieving revision 1.2
diff -u -r1.2 dw2-op-stack-value.exp
--- gdb.dwarf2/dw2-op-stack-value.exp	4 Jan 2012 08:17:51 -0000	1.2
+++ gdb.dwarf2/dw2-op-stack-value.exp	27 Jun 2012 16:58:20 -0000
@@ -19,15 +19,14 @@
     return 0   
 }
 
-set testfile "dw2-op-stack-value"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${objdir}/${subdir}/${executable}" object {nodebug}] != "" } {
+if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $binfile \
+	   object {nodebug}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 gdb_test "p/x stack2" " = 0x1"
 gdb_test "p/x stack8" " = 0x1"
Index: gdb.dwarf2/dw2-param-error.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-param-error.exp,v
retrieving revision 1.2
diff -u -r1.2 dw2-param-error.exp
--- gdb.dwarf2/dw2-param-error.exp	4 Jan 2012 08:17:51 -0000	1.2
+++ gdb.dwarf2/dw2-param-error.exp	27 Jun 2012 16:58:20 -0000
@@ -19,8 +19,10 @@
     return 0  
 }
 
-set testfile dw2-param-error
-if { [prepare_for_testing ${testfile}.exp "${testfile}" "${testfile}-main.c ${testfile}.S" {nodebug}] } {
+standard_testfile .S dw2-param-error-main.c
+
+if { [prepare_for_testing ${testfile}.exp "${testfile}" \
+	  [list $srcfile2 $srcfile] {nodebug}] } {
     return -1
 }
 
Index: gdb.dwarf2/dw2-producer.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-producer.exp,v
retrieving revision 1.10
diff -u -r1.10 dw2-producer.exp
--- gdb.dwarf2/dw2-producer.exp	4 Jan 2012 08:17:51 -0000	1.10
+++ gdb.dwarf2/dw2-producer.exp	27 Jun 2012 16:58:20 -0000
@@ -19,10 +19,8 @@
     return 0  
 }
 
-set testfile "dw2-producer"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-ranges.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-ranges.exp,v
retrieving revision 1.12
diff -u -r1.12 dw2-ranges.exp
--- gdb.dwarf2/dw2-ranges.exp	21 Jun 2012 20:46:23 -0000	1.12
+++ gdb.dwarf2/dw2-ranges.exp	27 Jun 2012 16:58:20 -0000
@@ -32,17 +32,13 @@
     return 0  
 }
 
-set testfile "dw2-ranges"
-set srcfile ${testfile}.c
-set srcfile2 ${testfile}2.c
-set srcfile3 ${testfile}3.c
-set asmfile ${objdir}/${subdir}/${testfile}.s
-set asmfile2 ${objdir}/${subdir}/${testfile}2.s
-set asmfile3 ${objdir}/${subdir}/${testfile}3.s
-set objfile ${objdir}/${subdir}/${testfile}.o
-set objfile2 ${objdir}/${subdir}/${testfile}2.o
-set objfile3 ${objdir}/${subdir}/${testfile}3.o
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile dw2-ranges.c dw2-ranges2.c dw2-ranges3.c
+set asmfile [standard_output_file ${testfile}.s]
+set asmfile2 [standard_output_file ${testfile}2.s]
+set asmfile3 [standard_output_file ${testfile}3.s]
+set objfile [standard_output_file ${testfile}.o]
+set objfile2 [standard_output_file ${testfile}2.o]
+set objfile3 [standard_output_file ${testfile}3.o]
 
 # Generate .s without debug info but provide debug info by the assembler.
 # This way we get DW_TAG_compile_unit DIE and only that DIE.
Index: gdb.dwarf2/dw2-ref-missing-frame.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-ref-missing-frame.exp,v
retrieving revision 1.8
diff -u -r1.8 dw2-ref-missing-frame.exp
--- gdb.dwarf2/dw2-ref-missing-frame.exp	4 Jan 2012 08:17:51 -0000	1.8
+++ gdb.dwarf2/dw2-ref-missing-frame.exp	27 Jun 2012 16:58:20 -0000
@@ -19,17 +19,15 @@
     return 0  
 }
 
-set testfile "dw2-ref-missing-frame"
-set srcsfile ${testfile}.S
-set objsfile ${objdir}/${subdir}/${testfile}.o
+standard_testfile .S
+set objsfile [standard_output_file ${testfile}.o]
 set srcfuncfile ${testfile}-func.c
-set objfuncfile ${objdir}/${subdir}/${testfile}-func.o
+set objfuncfile [standard_output_file ${testfile}-func.o]
 set srcmainfile ${testfile}-main.c
-set objmainfile ${objdir}/${subdir}/${testfile}-main.o
+set objmainfile [standard_output_file ${testfile}-main.o]
 set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}
 
-if { [gdb_compile "${srcdir}/${subdir}/${srcsfile}" $objsfile object {}] != ""
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" $objsfile object {}] != ""
      || [gdb_compile "${srcdir}/${subdir}/${srcfuncfile}" $objfuncfile object {}] != ""
      || [gdb_compile "${srcdir}/${subdir}/${srcmainfile}" $objmainfile object {debug}] != ""
      || [gdb_compile "$objsfile $objfuncfile $objmainfile" $binfile executable {}] != "" } {
Index: gdb.dwarf2/dw2-restore.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-restore.exp,v
retrieving revision 1.7
diff -u -r1.7 dw2-restore.exp
--- gdb.dwarf2/dw2-restore.exp	4 Jan 2012 08:17:51 -0000	1.7
+++ gdb.dwarf2/dw2-restore.exp	27 Jun 2012 16:58:20 -0000
@@ -19,9 +19,7 @@
 if {![istarget x86_64-*] || ![is_lp64_target]} {
     return 0  
 }
-set testfile "dw2-restore"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
        [list {additional_flags=-nostdlib}]] != "" } {
Index: gdb.dwarf2/dw2-simple-locdesc.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-simple-locdesc.exp,v
retrieving revision 1.4
diff -u -r1.4 dw2-simple-locdesc.exp
--- gdb.dwarf2/dw2-simple-locdesc.exp	4 Jan 2012 08:17:51 -0000	1.4
+++ gdb.dwarf2/dw2-simple-locdesc.exp	27 Jun 2012 16:58:20 -0000
@@ -19,16 +19,13 @@
     return 0  
 }
 
-set testfile "dw2-simple-locdesc"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 # Re: [patch 2/2] Fix decode_locdesc for gcc-4.7.x optimized DWARF
 # http://sourceware.org/ml/gdb-patches/2011-07/msg00766.html
Index: gdb.dwarf2/dw2-skip-prologue.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-skip-prologue.exp,v
retrieving revision 1.2
diff -u -r1.2 dw2-skip-prologue.exp
--- gdb.dwarf2/dw2-skip-prologue.exp	4 Jan 2012 08:17:51 -0000	1.2
+++ gdb.dwarf2/dw2-skip-prologue.exp	27 Jun 2012 16:58:20 -0000
@@ -36,9 +36,8 @@
     return 0  
 }
 
-set testfile "dw2-skip-prologue"
+standard_testfile
 set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}
 
 if {[build_executable ${testfile}.exp ${executable} "${testfile}.c ${testfile}.S" {additional_flags=-DINLINED}] == -1} {
     return -1
Index: gdb.dwarf2/dw2-stack-boundary.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-stack-boundary.exp,v
retrieving revision 1.6
diff -u -r1.6 dw2-stack-boundary.exp
--- gdb.dwarf2/dw2-stack-boundary.exp	4 Jan 2012 08:17:51 -0000	1.6
+++ gdb.dwarf2/dw2-stack-boundary.exp	27 Jun 2012 16:58:20 -0000
@@ -19,10 +19,7 @@
     return 0  
 }
 
-set testfile "dw2-stack-boundary"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-strp.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-strp.exp,v
retrieving revision 1.8
diff -u -r1.8 dw2-strp.exp
--- gdb.dwarf2/dw2-strp.exp	4 Jan 2012 08:17:51 -0000	1.8
+++ gdb.dwarf2/dw2-strp.exp	27 Jun 2012 16:58:20 -0000
@@ -22,9 +22,7 @@
     return 0
 }
 
-set testfile "dw2-strp"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
Index: gdb.dwarf2/dw2-var-zero-addr.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw2-var-zero-addr.exp,v
retrieving revision 1.2
diff -u -r1.2 dw2-var-zero-addr.exp
--- gdb.dwarf2/dw2-var-zero-addr.exp	4 Jan 2012 08:17:51 -0000	1.2
+++ gdb.dwarf2/dw2-var-zero-addr.exp	27 Jun 2012 16:58:20 -0000
@@ -19,8 +19,10 @@
     return 0  
 }
 
-set testfile dw2-var-zero-addr
-if [prepare_for_testing ${testfile}.exp ${testfile} [list ${testfile}.S main.c] {nodebug}] {
+standard_testfile .S main.c
+
+if [prepare_for_testing ${testfile}.exp ${testfile} \
+	[list $srcfile $srcfile2] {nodebug}] {
     return -1
 }
 
Index: gdb.dwarf2/dw4-sig-type-unused.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw4-sig-type-unused.exp,v
retrieving revision 1.2
diff -u -r1.2 dw4-sig-type-unused.exp
--- gdb.dwarf2/dw4-sig-type-unused.exp	4 Jan 2012 08:17:51 -0000	1.2
+++ gdb.dwarf2/dw4-sig-type-unused.exp	27 Jun 2012 16:58:20 -0000
@@ -19,10 +19,8 @@
     return 0  
 }
 
-set testfile "dw4-sig-type-unused"
-set srcfile ${testfile}.S
-set executable ${testfile}.x
-set binfile ${objdir}/${subdir}/${executable}
+standard_testfile .S
+set executable ${testfile}
 
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" object {}] != "" } {
     return -1
Index: gdb.dwarf2/dw4-sig-types.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/dw4-sig-types.exp,v
retrieving revision 1.4
diff -u -r1.4 dw4-sig-types.exp
--- gdb.dwarf2/dw4-sig-types.exp	4 Jan 2012 08:17:51 -0000	1.4
+++ gdb.dwarf2/dw4-sig-types.exp	27 Jun 2012 16:58:20 -0000
@@ -15,16 +15,15 @@
 
 # Test dwarf4 signatured types.
 
-set test "dw4-sig-types"
-set executable ${test}.x
+standard_testfile .cc dw4-sig-types-b.cc
 
 # This test is intended for targets which support DWARF-4.
 # Since we pass an explicit -gdwarf-4 to the compiler, we let
 # that be the test of whether the target supports it.
 
-if { [prepare_for_testing "${test}.exp" "${executable}" \
-	{dw4-sig-types.cc dw4-sig-types-b.cc} \
-	{debug c++ additional_flags=-gdwarf-4}] } {
+if { [prepare_for_testing "${test}.exp" "${testfile}" \
+	  [list $srcfile $srcfile2] \
+	  {debug c++ additional_flags=-gdwarf-4}] } {
     return -1
 }
 
Index: gdb.dwarf2/implptr-64bit.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/implptr-64bit.exp,v
retrieving revision 1.2
diff -u -r1.2 implptr-64bit.exp
--- gdb.dwarf2/implptr-64bit.exp	4 Jan 2012 08:17:51 -0000	1.2
+++ gdb.dwarf2/implptr-64bit.exp	27 Jun 2012 16:58:20 -0000
@@ -19,8 +19,7 @@
     return 0  
 }
 
-set testfile "implptr-64bit"
-set srcfile ${testfile}.S
+standard_testfile .S
 set mainfile main.c
 
 proc test { dwarf_version offset_size addr_size ref_addr_size } {
Index: gdb.dwarf2/implptr-optimized-out.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/implptr-optimized-out.exp,v
retrieving revision 1.2
diff -u -r1.2 implptr-optimized-out.exp
--- gdb.dwarf2/implptr-optimized-out.exp	4 Jan 2012 08:17:51 -0000	1.2
+++ gdb.dwarf2/implptr-optimized-out.exp	27 Jun 2012 16:58:20 -0000
@@ -19,11 +19,9 @@
     return 0  
 }
 
-set testfile "implptr-optimized-out"
-set srcfile ${testfile}.S
+standard_testfile .S
 set mainfile main.c
 set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}
 
 if [prepare_for_testing ${testfile}.exp $executable "${srcfile} ${mainfile}" {}] {
     return -1
Index: gdb.dwarf2/implptr.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/implptr.exp,v
retrieving revision 1.9
diff -u -r1.9 implptr.exp
--- gdb.dwarf2/implptr.exp	4 Jan 2012 08:17:51 -0000	1.9
+++ gdb.dwarf2/implptr.exp	27 Jun 2012 16:58:20 -0000
@@ -21,10 +21,8 @@
     return 0  
 }
 
-set testfile "implptr"
-set srcfile ${testfile}.S
+standard_testfile .S
 set csrcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}.x
 set opts {}
 
 if [info exists COMPILE] {
@@ -36,7 +34,7 @@
     return 0  
 }
 
-if {[prepare_for_testing ${testfile}.exp ${testfile}.x $srcfile $opts]} {
+if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile $opts]} {
     return -1
 }
 
Index: gdb.dwarf2/mac-fileno.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/mac-fileno.exp,v
retrieving revision 1.11
diff -u -r1.11 mac-fileno.exp
--- gdb.dwarf2/mac-fileno.exp	4 Jan 2012 08:17:51 -0000	1.11
+++ gdb.dwarf2/mac-fileno.exp	27 Jun 2012 16:58:20 -0000
@@ -22,10 +22,8 @@
     return 0  
 }
 
-set testfile "mac-fileno"
+standard_testfile .S
 set dwarf_srcfile "file1.txt"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
 
 if  { [gdb_compile "${srcdir}/${subdir}/main.c" "main.o" object {debug}] != "" } {
     return -1
Index: gdb.dwarf2/member-ptr-forwardref.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/member-ptr-forwardref.exp,v
retrieving revision 1.6
diff -u -r1.6 member-ptr-forwardref.exp
--- gdb.dwarf2/member-ptr-forwardref.exp	4 Jan 2012 08:17:51 -0000	1.6
+++ gdb.dwarf2/member-ptr-forwardref.exp	27 Jun 2012 16:58:20 -0000
@@ -21,11 +21,9 @@
 
 if { [skip_cplus_tests] } { continue }
 
-set testfile member-ptr-forwardref
-set executable ${testfile}
-set binfile ${objdir}/${subdir}/${executable}.x
+standard_testfile .S
 
-if { [gdb_compile "${srcdir}/${subdir}/${testfile}.S" ${binfile} object {debug}] != "" } {
+if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" ${binfile} object {debug}] != "" } {
     untested ${testfile}.exp
     return -1
 }
Index: gdb.dwarf2/pieces.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/pieces.exp,v
retrieving revision 1.11
diff -u -r1.11 pieces.exp
--- gdb.dwarf2/pieces.exp	4 Jan 2012 08:17:51 -0000	1.11
+++ gdb.dwarf2/pieces.exp	27 Jun 2012 16:58:20 -0000
@@ -24,12 +24,10 @@
     return 0  
 }
 
-set testfile "pieces"
-set srcfile ${testfile}.S
+standard_testfile .S
 set csrcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}.x
 
-if {[prepare_for_testing ${testfile}.exp ${testfile}.x $srcfile]} {
+if {[prepare_for_testing ${testfile}.exp ${testfile} $srcfile]} {
     return -1
 }
 
Index: gdb.dwarf2/pr10770.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/pr10770.exp,v
retrieving revision 1.4
diff -u -r1.4 pr10770.exp
--- gdb.dwarf2/pr10770.exp	21 Jun 2012 20:46:23 -0000	1.4
+++ gdb.dwarf2/pr10770.exp	27 Jun 2012 16:58:20 -0000
@@ -15,8 +15,7 @@
 
 # Test DW_OP_call_frame_cfa.
 
-set testfile "pr10770"
-set srcfile ${testfile}.c
+standard_testfile
 
 if {[prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}]} {
     return 0
Index: gdb.dwarf2/pr11465.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/pr11465.exp,v
retrieving revision 1.5
diff -u -r1.5 pr11465.exp
--- gdb.dwarf2/pr11465.exp	4 Jan 2012 08:17:51 -0000	1.5
+++ gdb.dwarf2/pr11465.exp	27 Jun 2012 16:58:20 -0000
@@ -19,10 +19,7 @@
     return 0  
 }
 
-set testfile "pr11465"
-set srcfile "$testfile.S"
-set executable "$testfile.x"
-set binfile [file join $objdir $subdir $executable]
+standard_testfile .S
 
 if [is_ilp32_target] {
     set ptrbits 32
@@ -35,7 +32,7 @@
     return -1
 }
 
-clean_restart $executable
+clean_restart $testfile
 
 # Test delayed physname computations
 gdb_test "p N::c.C" { = {void \(N::C \* const, void \(\*\)\(N::C\)\)}.*}
Index: gdb.dwarf2/pr13961.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/pr13961.exp,v
retrieving revision 1.1
diff -u -r1.1 pr13961.exp
--- gdb.dwarf2/pr13961.exp	1 May 2012 03:00:36 -0000	1.1
+++ gdb.dwarf2/pr13961.exp	27 Jun 2012 16:58:20 -0000
@@ -22,11 +22,9 @@
     return 0
 }
 
-set testfile "pr13961"
-set srcfile ${testfile}.S
-set binfile ${testfile}.x
+standard_testfile .S
 
-if { [prepare_for_testing ${testfile}.exp ${binfile} ${srcfile}] == -1 } {
+if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile}] == -1 } {
     return -1
 }
 
Index: gdb.dwarf2/valop.exp
===================================================================
RCS file: /cvs/src/src/gdb/testsuite/gdb.dwarf2/valop.exp,v
retrieving revision 1.6
diff -u -r1.6 valop.exp
--- gdb.dwarf2/valop.exp	4 Jan 2012 08:17:51 -0000	1.6
+++ gdb.dwarf2/valop.exp	27 Jun 2012 16:58:20 -0000
@@ -25,20 +25,13 @@
     return 0  
 }
 
-set testfile "valop"
-set srcfile ${testfile}.S
-set binfile ${objdir}/${subdir}/${testfile}.x
+standard_testfile .S
 
-if  { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
-       [list {additional_flags=-nostdlib}]] != "" } {
+if {[prepare_for_testing $testfile.exp $testfile \
+	 [list $srcfile] [list {additional_flags=-nostdlib}]]} {
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
 if ![runto_main] {
     return -1
 }


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