aboutsummaryrefslogtreecommitdiff
path: root/src/image
diff options
context:
space:
mode:
authorJoel Sing <joel@sing.id.au>2022-09-27 18:30:01 +1000
committerRoland Shoemaker <roland@golang.org>2022-09-27 15:57:34 +0000
commite978ef36e3e8d09413387883b5b01fc6cdbb7640 (patch)
treedb4be56de20d2c6b7169c9b889bcd916507514f4 /src/image
parent789e798f0436361bfe8ca492a933cfeb17d2780c (diff)
downloadgo-e978ef36e3e8d09413387883b5b01fc6cdbb7640.tar.xz
image/gif,image/jpeg,image/png: skip FuzzDecode in testing short mode
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 <roland@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org> Run-TryBot: Bryan Mills <bcmills@google.com> Reviewed-by: Bryan Mills <bcmills@google.com>
Diffstat (limited to 'src/image')
-rw-r--r--src/image/gif/fuzz_test.go4
-rw-r--r--src/image/jpeg/fuzz_test.go4
-rw-r--r--src/image/png/fuzz_test.go4
3 files changed, 12 insertions, 0 deletions
diff --git a/src/image/gif/fuzz_test.go b/src/image/gif/fuzz_test.go
index 3ddf15d80f..a4bc06ed69 100644
--- a/src/image/gif/fuzz_test.go
+++ b/src/image/gif/fuzz_test.go
@@ -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)
diff --git a/src/image/jpeg/fuzz_test.go b/src/image/jpeg/fuzz_test.go
index 716f06f43c..bd534a921d 100644
--- a/src/image/jpeg/fuzz_test.go
+++ b/src/image/jpeg/fuzz_test.go
@@ -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)
diff --git a/src/image/png/fuzz_test.go b/src/image/png/fuzz_test.go
index 22b3ef082a..4b639459e7 100644
--- a/src/image/png/fuzz_test.go
+++ b/src/image/png/fuzz_test.go
@@ -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)