diff options
author | Ian Lance Taylor <iant@google.com> | 2012-01-18 05:42:41 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2012-01-18 05:42:41 +0000 |
commit | 75327582d23d561f30d2e83302e4bb5881143df1 (patch) | |
tree | 9c488c125471691cf4767d68316db9ad6504cb4a /gcc | |
parent | 9e99dd505e3e1efab4d5257c4d46b82388a2f833 (diff) | |
download | gcc-75327582d23d561f30d2e83302e4bb5881143df1.zip gcc-75327582d23d561f30d2e83302e4bb5881143df1.tar.gz gcc-75327582d23d561f30d2e83302e4bb5881143df1.tar.bz2 |
re PR go/50656 (Several Go tests with unrecognized test line)
PR go/50656
* go.test/go-test.exp (go-gc-tests): Recognize some more test
lines.
From-SVN: r183270
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/testsuite/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/testsuite/go.test/go-test.exp | 49 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/fixedbugs/bug345.dir/main.go | 4 | ||||
-rw-r--r-- | gcc/testsuite/go.test/test/fixedbugs/bug364.go | 6 |
4 files changed, 56 insertions, 9 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 8507039f..352f15d 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,9 @@ +2012-01-17 Ian Lance Taylor <iant@google.com> + + PR go/50656 + * go.test/go-test.exp (go-gc-tests): Recognize some more test + lines. + 2012-01-17 Tobias Burnus <burnus@net-b.de> PR fortran/51869 diff --git a/gcc/testsuite/go.test/go-test.exp b/gcc/testsuite/go.test/go-test.exp index 10cd151..01be094 100644 --- a/gcc/testsuite/go.test/go-test.exp +++ b/gcc/testsuite/go.test/go-test.exp @@ -1,4 +1,4 @@ -# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc. +# Copyright (C) 2009, 2010, 2011, 2012 Free Software Foundation, Inc. # Written by Ian Lance Taylor <iant@google.com>. # This program is free software; you can redistribute it and/or modify @@ -467,6 +467,9 @@ proc go-gc-tests { } { $test_line] \ || [string match \ "// \$G \$D/\$F.dir/b.go && \$G \$D/\$F.dir/a.go" \ + $test_line] \ + || [string match \ + "// \$G \$D/\$F.dir/io.go && errchk \$G -e \$D/\$F.dir/main.go" \ $test_line] } { if { [string match \ "// \$G \$D/\$F.dir/bug0.go && errchk \$G \$D/\$F.dir/bug1.go" \ @@ -474,13 +477,20 @@ proc go-gc-tests { } { set name1 "bug0.go" set name2 "bug1.go" } elseif { [string match \ - "// \$G \$D/\$F.dir/p1.go && \$G \$D/\$F.dir/p2.go" \ - $test_line] } { + "// \$G \$D/\$F.dir/p1.go && \$G \$D/\$F.dir/p2.go" \ + $test_line] } { set name1 "p1.go" set name2 "p2.go" - } else { + } elseif { [string match \ + "// \$G \$D/\$F.dir/b.go && \$G \$D/\$F.dir/a.go" \ + $test_line] } { set name1 "b.go" set name2 "a.go" + } elseif { [string match \ + "// \$G \$D/\$F.dir/io.go && errchk \$G -e \$D/\$F.dir/main.go" \ + $test_line] } { + set name1 "io.go" + set name2 "main.go" } set hold_runtests $runtests set runtests "go-test.exp" @@ -492,6 +502,17 @@ proc go-gc-tests { } { file delete "[file rootname [file tail $file1]].o" set runtests $hold_runtests } elseif { [string match \ + "// \$G \$D/\${F}1.go && errchk \$G \$D/\$F.go" \ + $test_line ] } { + set hold_runtests $runtests + set runtests "go-test.exp" + set dg-do-what-default "assemble" + regsub "\\.go$" $test "1.go" file1 + dg-test -keep-output $file1 "-O" "-w $DEFAULT_GOCFLAGS" + errchk $test "" + file delete "[file rootname [file tail $file1]].o" + set runtests $hold_runtests + } elseif { [string match \ "// \$G \$D/\$F.dir/bug0.go && (! \$G \$D/\$F.dir/bug1.go || echo BUG*" \ $test_line] } { set hold_runtests $runtests @@ -537,14 +558,28 @@ proc go-gc-tests { } { set runtests $hold_runtests } elseif { [string match \ "// \$G \$D/bug160.dir/x.go && \$G \$D/bug160.dir/y.go && \$L y.\$A && ./\$A.out" \ - $test_line] } { + $test_line] \ + || [string match \ + "// \$G \$D/\$F.dir/p.go && \$G \$D/\$F.dir/main.go && \$L main.\$A && ./\$A.out" \ + $test_line] } { + if { [string match \ + "// \$G \$D/bug160.dir/x.go && \$G \$D/bug160.dir/y.go && \$L y.\$A && ./\$A.out" \ + $test_line] } { + set name1 "x.go" + set name2 "y.go" + } elseif { [string match \ + "// \$G \$D/\$F.dir/p.go && \$G \$D/\$F.dir/main.go && \$L main.\$A && ./\$A.out" \ + $test_line] } { + set name1 "p.go" + set name2 "main.go" + } set hold_runtests $runtests set runtests "go-test.exp" set dg-do-what-default "assemble" - regsub "\\.go$" $test ".dir/x.go" file1 + regsub "\\.go$" $test ".dir/$name1" file1 dg-test -keep-output $file1 "-O" "-w $DEFAULT_GOCFLAGS" set ofile1 "[file rootname [file tail $file1]].o" - regsub "\\.go$" $test ".dir/y.go" file2 + regsub "\\.go$" $test ".dir/$name2" file2 dg-test -keep-output $file2 "-O" "-w $DEFAULT_GOCFLAGS" set ofile2 "[file rootname [file tail $file2]].o" set dg-do-what-default "link" diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug345.dir/main.go b/gcc/testsuite/go.test/test/fixedbugs/bug345.dir/main.go index 5bdc713..ddba8da 100644 --- a/gcc/testsuite/go.test/test/fixedbugs/bug345.dir/main.go +++ b/gcc/testsuite/go.test/test/fixedbugs/bug345.dir/main.go @@ -22,7 +22,7 @@ func main() { // main.go:27: cannot use &x (type *"io".SectionReader) as type *"/Users/rsc/g/go/test/fixedbugs/bug345.dir/io".SectionReader in function argument var w io.Writer - bufio.NewWriter(w) // ERROR "test/io" + bufio.NewWriter(w) // ERROR "test/io|has incompatible type" var x goio.SectionReader - io.SR(&x) // ERROR "test/io" + io.SR(&x) // ERROR "test/io|has incompatible type" } diff --git a/gcc/testsuite/go.test/test/fixedbugs/bug364.go b/gcc/testsuite/go.test/test/fixedbugs/bug364.go index a174534..a933121 100644 --- a/gcc/testsuite/go.test/test/fixedbugs/bug364.go +++ b/gcc/testsuite/go.test/test/fixedbugs/bug364.go @@ -1,3 +1,9 @@ +// $G $D/$F.go && $L $F.$A && ./$A.out + +// Copyright 2011 The Go Authors. All rights reserved. +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + package main import "fmt" |