Skip to content

Commit cb93964

Browse files
thepuddsdvyukov
authored andcommitted
testscripts: add go-fuzz-dep after cleaning up
1 parent 5ac91b7 commit cb93964

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

testscripts/mod_outside_gopath.txt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -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).
1717
env 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.
2023
exec go list -m all
2124
stdout '^example.com/foo$'
@@ -38,6 +41,7 @@ stderr 'workers: \d+, corpus: '
3841
# Clean up.
3942
cp go.mod_PRISTINE go.mod
4043
rm 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.
4347
env GO111MODULE=on
@@ -58,6 +62,7 @@ stderr 'workers: \d+, corpus: '
5862
# Clean up.
5963
cp go.mod_PRISTINE go.mod
6064
rm 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.
8186
cp go.mod_PRISTINE go.mod
8287
rm 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).
99105
cp go.mod_PRISTINE go.mod
100106
rm 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

110117
replace 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 --
116120
package foo
117121

0 commit comments

Comments
 (0)