* lib/gdb.exp (standard_output_file): Use "file join".
authorTom Tromey <tromey@redhat.com>
Mon, 25 Jun 2012 19:13:25 +0000 (19:13 +0000)
committerTom Tromey <tromey@redhat.com>
Mon, 25 Jun 2012 19:13:25 +0000 (19:13 +0000)
* gdb.go/chan.exp: Use standard_testfile.
* gdb.go/handcall.exp: Use standard_testfile.
* gdb.go/hello.exp: Use standard_testfile.
* gdb.integers/chan.exp: Use standard_testfile.
* gdb.go/methods.exp: Use standard_testfile.
* gdb.go/package.exp: Use standard_testfile.
* gdb.go/strings.exp: Use standard_testfile.
* gdb.go/types.exp: Use standard_testfile.
* gdb.go/unsafe.exp: Use standard_testfile.

gdb/testsuite/ChangeLog
gdb/testsuite/gdb.go/chan.exp
gdb/testsuite/gdb.go/handcall.exp
gdb/testsuite/gdb.go/hello.exp
gdb/testsuite/gdb.go/integers.exp
gdb/testsuite/gdb.go/methods.exp
gdb/testsuite/gdb.go/package.exp
gdb/testsuite/gdb.go/strings.exp
gdb/testsuite/gdb.go/types.exp
gdb/testsuite/gdb.go/unsafe.exp
gdb/testsuite/lib/gdb.exp

index cec39a0..7c4fe35 100644 (file)
@@ -1,3 +1,16 @@
+2012-06-25  Tom Tromey  <tromey@redhat.com>
+
+       * lib/gdb.exp (standard_output_file): Use "file join".
+       * gdb.go/chan.exp: Use standard_testfile.
+       * gdb.go/handcall.exp: Use standard_testfile.
+       * gdb.go/hello.exp: Use standard_testfile.
+       * gdb.integers/chan.exp: Use standard_testfile.
+       * gdb.go/methods.exp: Use standard_testfile.
+       * gdb.go/package.exp: Use standard_testfile.
+       * gdb.go/strings.exp: Use standard_testfile.
+       * gdb.go/types.exp: Use standard_testfile.
+       * gdb.go/unsafe.exp: Use standard_testfile.
+
 2012-06-25  Greta Yorsh  <greta.yorsh@arm.com>
 
        * gdb.arch/arm-disp-step.S: Fix use of .global directives.
index 317e214..1becbc1 100644 (file)
@@ -22,8 +22,7 @@ load_lib "go.exp"
 
 if { [skip_go_tests] } { continue }
 
-set testfile "chan"
-set srcfile ${testfile}.go
+standard_testfile .go
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
     return -1
index 077186e..7dd6d6e 100644 (file)
@@ -21,8 +21,7 @@ load_lib "go.exp"
 
 if { [skip_go_tests] } { continue }
 
-set testfile "handcall"
-set srcfile ${testfile}.go
+standard_testfile .go
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
     return -1
index e6abfb9..94f9b67 100644 (file)
@@ -21,8 +21,7 @@ load_lib "go.exp"
 
 if { [skip_go_tests] } { continue }
 
-set testfile "hello"
-set srcfile ${testfile}.go
+standard_testfile .go
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
     return -1
index 202c56d..68626c7 100644 (file)
@@ -21,8 +21,7 @@ load_lib "go.exp"
 
 if { [skip_go_tests] } { continue }
 
-set testfile "integers"
-set srcfile ${testfile}.go
+standard_testfile .go
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
     return -1
index e63870a..31a441e 100644 (file)
@@ -21,8 +21,7 @@ load_lib "go.exp"
 
 if { [skip_go_tests] } { continue }
 
-set testfile "methods"
-set srcfile ${testfile}.go
+standard_testfile .go
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
     return -1
index 80d51cc..a9186ac 100644 (file)
@@ -21,21 +21,13 @@ load_lib "go.exp"
 
 if { [skip_go_tests] } { continue }
 
-set testfile "package"
-set binfile ${objdir}/${subdir}/${testfile}
+standard_testfile package1.go package2.go
 
-if  { [gdb_compile "${srcdir}/${subdir}/${testfile}2.go" "${binfile}2.o" object {debug go}] != "" } {
-    untested $testfile
+if {[prepare_for_testing $testfile.exp $testfile [list $srcfile $srcfile2] \
+        [list debug go libdir=[standard_output_file {}]]]} {
     return -1
 }
 
-if  { [gdb_compile "${srcdir}/${subdir}/${testfile}1.go ${binfile}2.o" "${binfile}" executable "debug go libdir=${objdir}/${subdir}"] != "" } {
-    untested $testfile
-    return -1
-}
-
-clean_restart $testfile
-
 if { [go_runto_main] < 0 } {
     untested methods
     return -1
index b1b3fed..a4885a9 100644 (file)
@@ -19,8 +19,7 @@ load_lib "go.exp"
 
 if { [skip_go_tests] } { continue }
 
-set testfile "strings"
-set srcfile ${testfile}.go
+standard_testfile .go
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
     return -1
index 20ac910..da9d387 100644 (file)
@@ -21,8 +21,7 @@ load_lib "go.exp"
 
 if { [skip_go_tests] } { continue }
 
-set testfile "types"
-set srcfile ${testfile}.go
+standard_testfile .go
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
     return -1
index 1535ce2..eb536b2 100644 (file)
@@ -21,8 +21,7 @@ load_lib "go.exp"
 
 if { [skip_go_tests] } { continue }
 
-set testfile "unsafe"
-set srcfile ${testfile}.go
+standard_testfile .go
 
 if { [prepare_for_testing ${testfile}.exp ${testfile} ${srcfile} {debug go}] } {
     return -1
index b40eef8..7cb619a 100644 (file)
@@ -3067,12 +3067,13 @@ proc default_gdb_init { args } {
 }
 
 # Turn BASENAME into a full file name in the standard output
-# directory.
+# directory.  It is ok if BASENAME is the empty string; in this case
+# the directory is returned.
 
 proc standard_output_file {basename} {
     global objdir subdir
 
-    return $objdir/$subdir/$basename
+    return [file join $objdir $subdir $basename]
 }
 
 # Set 'testfile', 'srcfile', and 'binfile'.