diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 19d3bd68e3c8..37772647ca19 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-07-20 Ian Lance Taylor + + * go.test/go-test.exp (go-gc-tests): Support multiple files in one + package for compiledir tests. + 2014-07-20 Marek Polacek PR c/61852 diff --git a/gcc/testsuite/go.test/go-test.exp b/gcc/testsuite/go.test/go-test.exp index 04fabdbdcbab..eed0d68e4c70 100644 --- a/gcc/testsuite/go.test/go-test.exp +++ b/gcc/testsuite/go.test/go-test.exp @@ -651,13 +651,17 @@ proc go-gc-tests { } { set runtests "go-test.exp" set dg-do-what-default "assemble" set dir "[file rootname $test].dir" - set del {} - foreach f [lsort [glob "$dir/*.go"]] { - dg-test -keep-output $f "-O" "-w $DEFAULT_GOCFLAGS" - lappend del "[file rootname [file tail $f]].o" - } - foreach f $del { - file delete $f + set files [lsort [glob "$dir/*.go"]] + set packages [go-find-packages $test $name $files] + if { [llength $packages] > 0 } { + set del [list] + foreach p $packages { + dg-test -keep-output [lindex $p 1] "[lrange $p 2 end] -O" "-w $DEFAULT_GOCFLAGS" + lappend del "[file rootname [file tail [lindex $p 1]]].o" + } + foreach f $del { + file delete $f + } } set runtests $hold_runtests } elseif { $test_line == "// rundir" } {