mirror of
https://github.com/golang/go
synced 2024-11-17 10:44:43 -07:00
cmd/go: disable gofuzzbeta build tag by default
It was enabled by default on the dev.fuzz branch so that users could check in fuzz targets without breaking their builds. Now that dev.fuzz is merged to master, users should switch to a go1.18 release constraint instead. For #47037 Change-Id: I0475368eb4570fe0c7027a3ae8f6950449c1a9ca Reviewed-on: https://go-review.googlesource.com/c/go/+/351118 Trust: Jay Conrod <jayconrod@google.com> Trust: Katie Hockman <katie@golang.org> Run-TryBot: Jay Conrod <jayconrod@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Katie Hockman <katie@golang.org>
This commit is contained in:
parent
9ab6af9837
commit
d542765896
@ -61,9 +61,6 @@ var (
|
|||||||
func defaultContext() build.Context {
|
func defaultContext() build.Context {
|
||||||
ctxt := build.Default
|
ctxt := build.Default
|
||||||
|
|
||||||
// TODO(#47037): remove this tag before merging to master.
|
|
||||||
ctxt.BuildTags = []string{"gofuzzbeta"}
|
|
||||||
|
|
||||||
ctxt.JoinPath = filepath.Join // back door to say "do not use go command"
|
ctxt.JoinPath = filepath.Join // back door to say "do not use go command"
|
||||||
|
|
||||||
ctxt.GOROOT = findGOROOT()
|
ctxt.GOROOT = findGOROOT()
|
||||||
|
31
src/cmd/go/testdata/script/test_fuzz_tag.txt
vendored
31
src/cmd/go/testdata/script/test_fuzz_tag.txt
vendored
@ -1,31 +0,0 @@
|
|||||||
# Check that the gofuzzbeta tag is enabled by default and can be disabled.
|
|
||||||
# TODO(jayconrod,katiehockman): before merging to master, restore the old
|
|
||||||
# default and delete this test.
|
|
||||||
|
|
||||||
[short] skip
|
|
||||||
|
|
||||||
go test -list=.
|
|
||||||
stdout Test
|
|
||||||
stdout Fuzz
|
|
||||||
|
|
||||||
go test -tags=
|
|
||||||
|
|
||||||
-- go.mod --
|
|
||||||
module fuzz
|
|
||||||
|
|
||||||
go 1.17
|
|
||||||
-- fuzz_test.go --
|
|
||||||
// +build gofuzzbeta
|
|
||||||
|
|
||||||
package fuzz
|
|
||||||
|
|
||||||
import "testing"
|
|
||||||
|
|
||||||
func Fuzz(f *testing.F) {
|
|
||||||
f.Add([]byte(nil))
|
|
||||||
f.Fuzz(func(*testing.T, []byte) {})
|
|
||||||
}
|
|
||||||
|
|
||||||
func Test(*testing.T) {}
|
|
||||||
-- empty_test.go --
|
|
||||||
package fuzz
|
|
Loading…
Reference in New Issue
Block a user