From 8a3e1f8d521c1ba7f4aa0449138f55106273afc2 Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Mon, 25 Jun 2012 19:13:25 +0000 Subject: [PATCH] * 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. --- gdb/testsuite/ChangeLog | 13 +++++++++++++ gdb/testsuite/gdb.go/chan.exp | 3 +-- gdb/testsuite/gdb.go/handcall.exp | 3 +-- gdb/testsuite/gdb.go/hello.exp | 3 +-- gdb/testsuite/gdb.go/integers.exp | 3 +-- gdb/testsuite/gdb.go/methods.exp | 3 +-- gdb/testsuite/gdb.go/package.exp | 14 +++----------- gdb/testsuite/gdb.go/strings.exp | 3 +-- gdb/testsuite/gdb.go/types.exp | 3 +-- gdb/testsuite/gdb.go/unsafe.exp | 3 +-- gdb/testsuite/lib/gdb.exp | 5 +++-- 11 files changed, 27 insertions(+), 29 deletions(-) diff --git a/gdb/testsuite/ChangeLog b/gdb/testsuite/ChangeLog index cec39a0a774..7c4fe35bac3 100644 --- a/gdb/testsuite/ChangeLog +++ b/gdb/testsuite/ChangeLog @@ -1,3 +1,16 @@ +2012-06-25 Tom Tromey + + * 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 * 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 317e21406b2..1becbc1ee63 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 077186eaec0..7dd6d6eb919 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 e6abfb99da3..94f9b67ad49 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 202c56d17e2..68626c7b294 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 e63870af262..31a441e8d1d 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 80d51cc25f1..a9186ac2df4 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 b1b3fed3d67..a4885a93543 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 20ac910118f..da9d387b430 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 1535ce2df06..eb536b2d841 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 b40eef8361c..7cb619a8555 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'. -- 2.30.2