libgo: compile examples in _test packages
authorIan Lance Taylor <ian@gcc.gnu.org>
Thu, 9 Jan 2020 23:14:57 +0000 (23:14 +0000)
committerIan Lance Taylor <ian@gcc.gnu.org>
Thu, 9 Jan 2020 23:14:57 +0000 (23:14 +0000)
commitfcee603081c754044e682f9263f526fcefc9442c
treefd799d5e04409a5f50a3570151d4ef62c558bb09
parentacd43917df56f8845b1497d939da97f4e22b5ebb
libgo: compile examples in _test packages

    Previously if the only names defined by _test packages were examples,
    the gotest script would emit an incorrect _testmain.go file.
    I worked around that by marking the example_test.go files +build ignored.

    This CL changes the gotest script to handle this case correctly,
    and removes the now-unnecessary build tags.

    Reviewed-on: https://go-review.googlesource.com/c/gofrontend/+/214039

From-SVN: r280085
44 files changed:
gcc/go/gofrontend/MERGE
libgo/go/compress/flate/example_test.go
libgo/go/compress/gzip/example_test.go
libgo/go/container/ring/example_test.go
libgo/go/crypto/sha256/example_test.go
libgo/go/database/sql/example_cli_test.go
libgo/go/database/sql/example_service_test.go
libgo/go/encoding/csv/example_test.go
libgo/go/encoding/hex/example_test.go
libgo/go/encoding/json/example_marshaling_test.go
libgo/go/encoding/json/example_text_marshaling_test.go
libgo/go/encoding/pem/example_test.go
libgo/go/encoding/xml/example_marshaling_test.go
libgo/go/encoding/xml/example_text_marshaling_test.go
libgo/go/fmt/example_test.go
libgo/go/fmt/gostringer_example_test.go
libgo/go/fmt/stringer_example_test.go
libgo/go/go/types/example_test.go
libgo/go/hash/crc32/example_test.go
libgo/go/hash/example_test.go
libgo/go/html/example_test.go
libgo/go/html/template/example_test.go
libgo/go/html/template/examplefiles_test.go
libgo/go/image/draw/example_test.go
libgo/go/image/png/example_test.go
libgo/go/index/suffixarray/example_test.go
libgo/go/io/ioutil/example_test.go
libgo/go/io/ioutil/testdata/hello [new file with mode: 0644]
libgo/go/log/syslog/example_test.go
libgo/go/math/big/example_rat_test.go
libgo/go/math/big/floatexample_test.go
libgo/go/math/bits/example_test.go
libgo/go/math/cmplx/example_test.go
libgo/go/mime/example_test.go
libgo/go/mime/quotedprintable/example_test.go
libgo/go/net/http/cookiejar/dummy_publicsuffix_test.go
libgo/go/net/http/cookiejar/example_test.go
libgo/go/net/http/httptrace/example_test.go
libgo/go/net/http/httputil/example_test.go
libgo/go/net/mail/example_test.go
libgo/go/path/filepath/example_test.go
libgo/go/runtime/trace/example_test.go
libgo/go/text/scanner/example_test.go
libgo/testsuite/gotest