@@ -16,6 +16,9 @@ cp go.mod_PRISTINE go.mod
1616# in Go 1.11-1.13. (In 1.14, the default will likely be GO111MODULE=on).
1717env GO111MODULE=auto
1818
19+ # Because cmd/go now defaults to -mod=readonly, we need to explicitly add go-fuzz-dep.
20+ go get github.com/dvyukov/go-fuzz/go-fuzz-dep
21+
1922# Sanity check the module seems well formed.
2023exec go list -m all
2124stdout '^example.com/foo$'
@@ -38,6 +41,7 @@ stderr 'workers: \d+, corpus: '
3841# Clean up.
3942cp go.mod_PRISTINE go.mod
4043rm foo-fuzz.zip
44+ go get github.com/dvyukov/go-fuzz/go-fuzz-dep
4145
4246# Second, we test with GO111MODULE=on, which will likely be the default in Go 1.14.
4347env GO111MODULE=on
@@ -58,6 +62,7 @@ stderr 'workers: \d+, corpus: '
5862# Clean up.
5963cp go.mod_PRISTINE go.mod
6064rm foo-fuzz.zip
65+ go get github.com/dvyukov/go-fuzz/go-fuzz-dep
6166
6267# Third, we test with GO111MODULE unset.
6368# The meaning of this will likely change in Go 1.14, but given we are
@@ -80,6 +85,7 @@ stderr 'workers: \d+, corpus: '
8085# Clean up.
8186cp go.mod_PRISTINE go.mod
8287rm foo-fuzz.zip
88+ go get github.com/dvyukov/go-fuzz/go-fuzz-dep
8389
8490# Fourth, we test with GO111MODULE=off.
8591# The meaning of this is unlikely to change in Go 1.14,
@@ -98,6 +104,7 @@ env GO111MODULE=off
98104# Clean up (mainly in case we later add another test below).
99105cp go.mod_PRISTINE go.mod
100106rm foo-fuzz.zip
107+ go get github.com/dvyukov/go-fuzz/go-fuzz-dep
101108
102109# Define two modules.
103110# example.com/foo has a fuzz function, and depends on example.com/bar.
@@ -109,9 +116,6 @@ require example.com/bar v0.0.0
109116
110117replace example.com/bar => ../bar
111118
112- // We need a require on go-fuzz to find go-fuzz-dep.
113- require github.com/dvyukov/go-fuzz latest
114-
115119-- foo/fuzz.go --
116120package foo
117121
0 commit comments