aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gdb/testsuite/ChangeLog13
-rw-r--r--gdb/testsuite/gdb.go/chan.exp3
-rw-r--r--gdb/testsuite/gdb.go/handcall.exp3
-rw-r--r--gdb/testsuite/gdb.go/hello.exp3
-rw-r--r--gdb/testsuite/gdb.go/integers.exp3
-rw-r--r--gdb/testsuite/gdb.go/methods.exp3
-rw-r--r--gdb/testsuite/gdb.go/package.exp14
-rw-r--r--gdb/testsuite/gdb.go/strings.exp3
-rw-r--r--gdb/testsuite/gdb.go/types.exp3
-rw-r--r--gdb/testsuite/gdb.go/unsafe.exp3
-rw-r--r--gdb/testsuite/lib/gdb.exp5
11 files changed, 27 insertions, 29 deletions
diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog
index cec39a0..7c4fe35 100644
--- a/gdb/testsuite/ChangeLog
+++ b/gdb/testsuite/ChangeLog
@@ -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.
diff --git a/gdb/testsuite/gdb.go/chan.exp b/gdb/testsuite/gdb.go/chan.exp
index 317e214..1becbc1 100644
--- a/gdb/testsuite/gdb.go/chan.exp
+++ b/gdb/testsuite/gdb.go/chan.exp
@@ -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
diff --git a/gdb/testsuite/gdb.go/handcall.exp b/gdb/testsuite/gdb.go/handcall.exp
index 077186e..7dd6d6e 100644
--- a/gdb/testsuite/gdb.go/handcall.exp
+++ b/gdb/testsuite/gdb.go/handcall.exp
@@ -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
diff --git a/gdb/testsuite/gdb.go/hello.exp b/gdb/testsuite/gdb.go/hello.exp
index e6abfb9..94f9b67 100644
--- a/gdb/testsuite/gdb.go/hello.exp
+++ b/gdb/testsuite/gdb.go/hello.exp
@@ -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
diff --git a/gdb/testsuite/gdb.go/integers.exp b/gdb/testsuite/gdb.go/integers.exp
index 202c56d..68626c7 100644
--- a/gdb/testsuite/gdb.go/integers.exp
+++ b/gdb/testsuite/gdb.go/integers.exp
@@ -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
diff --git a/gdb/testsuite/gdb.go/methods.exp b/gdb/testsuite/gdb.go/methods.exp
index e63870a..31a441e 100644
--- a/gdb/testsuite/gdb.go/methods.exp
+++ b/gdb/testsuite/gdb.go/methods.exp
@@ -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
diff --git a/gdb/testsuite/gdb.go/package.exp b/gdb/testsuite/gdb.go/package.exp
index 80d51cc..a9186ac 100644
--- a/gdb/testsuite/gdb.go/package.exp
+++ b/gdb/testsuite/gdb.go/package.exp
@@ -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
diff --git a/gdb/testsuite/gdb.go/strings.exp b/gdb/testsuite/gdb.go/strings.exp
index b1b3fed..a4885a9 100644
--- a/gdb/testsuite/gdb.go/strings.exp
+++ b/gdb/testsuite/gdb.go/strings.exp
@@ -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
diff --git a/gdb/testsuite/gdb.go/types.exp b/gdb/testsuite/gdb.go/types.exp
index 20ac910..da9d387 100644
--- a/gdb/testsuite/gdb.go/types.exp
+++ b/gdb/testsuite/gdb.go/types.exp
@@ -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
diff --git a/gdb/testsuite/gdb.go/unsafe.exp b/gdb/testsuite/gdb.go/unsafe.exp
index 1535ce2..eb536b2 100644
--- a/gdb/testsuite/gdb.go/unsafe.exp
+++ b/gdb/testsuite/gdb.go/unsafe.exp
@@ -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
diff --git a/gdb/testsuite/lib/gdb.exp b/gdb/testsuite/lib/gdb.exp
index b40eef8..7cb619a 100644
--- a/gdb/testsuite/lib/gdb.exp
+++ b/gdb/testsuite/lib/gdb.exp
@@ -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'.