Skip to content

Commit

Permalink
image/gif,image/jpeg,image/png: skip FuzzDecode in testing short mode
Browse files Browse the repository at this point in the history
The image/gif.FuzzDecode takes an excessive amount of time to run on various
builders - skip these in testing short mode. Likewise for image/jpeg and
image/png.

Fixes #55839

Change-Id: I1049d06b9dcbbc7dbc4f53d3c49b64e2254eabbd
Reviewed-on: https://go-review.googlesource.com/c/go/+/435175
Reviewed-by: Roland Shoemaker <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Run-TryBot: Bryan Mills <[email protected]>
Reviewed-by: Bryan Mills <[email protected]>
  • Loading branch information
4a6f656c authored and rolandshoemaker committed Sep 27, 2022
1 parent 789e798 commit e978ef3
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/image/gif/fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import (
)

func FuzzDecode(f *testing.F) {
if testing.Short() {
f.Skip("Skipping in short mode")
}

testdata, err := os.ReadDir("../testdata")
if err != nil {
f.Fatalf("failed to read testdata directory: %s", err)
Expand Down
4 changes: 4 additions & 0 deletions src/image/jpeg/fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import (
)

func FuzzDecode(f *testing.F) {
if testing.Short() {
f.Skip("Skipping in short mode")
}

testdata, err := os.ReadDir("../testdata")
if err != nil {
f.Fatalf("failed to read testdata directory: %s", err)
Expand Down
4 changes: 4 additions & 0 deletions src/image/png/fuzz_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ import (
)

func FuzzDecode(f *testing.F) {
if testing.Short() {
f.Skip("Skipping in short mode")
}

testdata, err := os.ReadDir("../testdata")
if err != nil {
f.Fatalf("failed to read testdata directory: %s", err)
Expand Down

0 comments on commit e978ef3

Please sign in to comment.