Go testsuite: handle +build lines correctly
commitdc00689332f023d959a8e9f01368f59b756a7017
authorIan Lance Taylor <iant@golang.org>
Fri, 18 Dec 2020 05:33:51 +0000 (17 21:33 -0800)
committerIan Lance Taylor <iant@golang.org>
Fri, 18 Dec 2020 05:35:25 +0000 (17 21:35 -0800)
tree9ff4375c067bf5455161a072e34810b335b0c478
parentddb9c661c2f1040a2fe569098fce09f44ab05b52
Go testsuite: handle +build lines correctly

Update the Go testsuite driver to handle +build lines as is done in
the upstream repo, and update some tests to the upstream repo copy
using +build lines with "gc" and "!gccgo" as appropriate.

* go.test/go-test.exp (go-set-goos): New procedure.
(go-gc-match): New procedure.
(go-gc-tests): Call go-set-goos.  Use go-gc-match to handle +build
lines.  Look for +build lines beyond first line of file.
18 files changed:
gcc/testsuite/go.test/go-test.exp
gcc/testsuite/go.test/test/fixedbugs/bug302.go
gcc/testsuite/go.test/test/fixedbugs/bug369.go
gcc/testsuite/go.test/test/fixedbugs/issue10607.go
gcc/testsuite/go.test/test/fixedbugs/issue11771.go
gcc/testsuite/go.test/test/fixedbugs/issue13268.go
gcc/testsuite/go.test/test/fixedbugs/issue14636.go
gcc/testsuite/go.test/test/fixedbugs/issue16037_run.go
gcc/testsuite/go.test/test/fixedbugs/issue19658.go
gcc/testsuite/go.test/test/fixedbugs/issue21317.go
gcc/testsuite/go.test/test/fixedbugs/issue21576.go
gcc/testsuite/go.test/test/fixedbugs/issue22660.go
gcc/testsuite/go.test/test/fixedbugs/issue33275_run.go
gcc/testsuite/go.test/test/fixedbugs/issue33555.go
gcc/testsuite/go.test/test/fixedbugs/issue36437.go
gcc/testsuite/go.test/test/fixedbugs/issue9355.go
gcc/testsuite/go.test/test/fixedbugs/issue9862_run.go
gcc/testsuite/go.test/test/run.go