blob: 952cb1a59ae1db4a8160816cf8d6b08dc5775c86 [file] [log] [blame]
Eric Borena1613c92020-03-02 12:55:38 -05001// Copyright 2020 The Chromium Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5package gen_tasks_logic
6
7import (
8 "fmt"
9 "log"
10 "sort"
11 "strconv"
12 "strings"
13
14 "github.com/golang/glog"
15 "go.skia.org/infra/task_scheduler/go/specs"
16)
17
18// keyParams generates the key used by DM for Gold results.
19func keyParams(parts map[string]string) []string {
20 // Don't bother to include role, which is always Test.
21 blacklist := []string{"role", "test_filter"}
22 keys := make([]string, 0, len(parts))
23 for key := range parts {
24 found := false
25 for _, b := range blacklist {
26 if key == b {
27 found = true
28 break
29 }
30 }
31 if !found {
32 keys = append(keys, key)
33 }
34 }
35 sort.Strings(keys)
36 rv := make([]string, 0, 2*len(keys))
37 for _, key := range keys {
38 rv = append(rv, key, parts[key])
39 }
40 return rv
41}
42
43// dmFlags generates flags to DM based on the given task properties.
Eric Boren457c1eb2020-03-16 13:49:33 -040044func (b *taskBuilder) dmFlags(internalHardwareLabel string) {
Eric Borena1613c92020-03-02 12:55:38 -050045 properties := map[string]string{
46 "gitHash": specs.PLACEHOLDER_REVISION,
Eric Borenc27e7022020-03-09 08:43:45 -040047 "builder": b.Name,
Eric Borena1613c92020-03-02 12:55:38 -050048 "buildbucket_build_id": specs.PLACEHOLDER_BUILDBUCKET_BUILD_ID,
49 "task_id": specs.PLACEHOLDER_TASK_ID,
50 "issue": specs.PLACEHOLDER_ISSUE,
51 "patchset": specs.PLACEHOLDER_PATCHSET,
52 "patch_storage": specs.PLACEHOLDER_PATCH_STORAGE,
53 "swarming_bot_id": "${SWARMING_BOT_ID}",
54 "swarming_task_id": "${SWARMING_TASK_ID}",
55 }
56
57 args := []string{
58 "dm",
59 "--nameByHash",
60 }
61
62 configs := []string{}
63 blacklisted := []string{}
64
Eric Borena1613c92020-03-02 12:55:38 -050065 hasConfig := func(cfg string) bool {
66 for _, c := range configs {
67 if c == cfg {
68 return true
69 }
70 }
71 return false
72 }
Eric Borena1613c92020-03-02 12:55:38 -050073 filter := func(slice []string, elems ...string) []string {
74 m := make(map[string]bool, len(elems))
75 for _, e := range elems {
76 m[e] = true
77 }
78 rv := make([]string, 0, len(slice))
79 for _, e := range slice {
80 if m[e] {
81 rv = append(rv, e)
82 }
83 }
84 return rv
85 }
86 remove := func(slice []string, elem string) []string {
87 rv := make([]string, 0, len(slice))
88 for _, e := range slice {
89 if e != elem {
90 rv = append(rv, e)
91 }
92 }
93 return rv
94 }
95 removeContains := func(slice []string, elem string) []string {
96 rv := make([]string, 0, len(slice))
97 for _, e := range slice {
98 if !strings.Contains(e, elem) {
99 rv = append(rv, e)
100 }
101 }
102 return rv
103 }
104 prefix := func(slice []string, pfx string) []string {
105 rv := make([]string, 0, len(slice))
106 for _, e := range slice {
107 rv = append(rv, pfx+e)
108 }
109 return rv
110 }
111
112 blacklist := func(quad ...string) {
113 if len(quad) == 1 {
114 quad = strings.Fields(quad[0])
115 }
116 if len(quad) != 4 {
117 log.Fatalf("Invalid value for blacklist: %+v", quad)
118 }
119 config := quad[0]
120 src := quad[1]
121 options := quad[2]
122 name := quad[3]
123 if config == "_" ||
124 hasConfig(config) ||
125 (config[0] == '~' && hasConfig(config[1:])) {
126 blacklisted = append(blacklisted, config, src, options, name)
127 }
128 }
129
Eric Borena1613c92020-03-02 12:55:38 -0500130 // Keys.
Eric Borenc27e7022020-03-09 08:43:45 -0400131 keys := keyParams(b.parts)
132 if b.extraConfig("Lottie") {
Eric Borena1613c92020-03-02 12:55:38 -0500133 keys = append(keys, "renderer", "skottie")
134 }
Eric Borenc27e7022020-03-09 08:43:45 -0400135 if b.matchExtraConfig("DDL") {
Eric Borena1613c92020-03-02 12:55:38 -0500136 // 'DDL' style means "--skpViewportSize 2048 --pr ~small"
137 keys = append(keys, "style", "DDL")
138 } else {
139 keys = append(keys, "style", "default")
140 }
141 args = append(args, "--key")
142 args = append(args, keys...)
143
144 // This enables non-deterministic random seeding of the GPU FP optimization
145 // test.
146 // Not Android due to:
147 // - https://skia.googlesource.com/skia/+/5910ed347a638ded8cd4c06dbfda086695df1112/BUILD.gn#160
148 // - https://skia.googlesource.com/skia/+/ce06e261e68848ae21cac1052abc16bc07b961bf/tests/ProcessorTest.cpp#307
149 // Not MSAN due to:
150 // - https://skia.googlesource.com/skia/+/0ac06e47269a40c177747310a613d213c95d1d6d/infra/bots/recipe_modules/flavor/gn_flavor.py#80
Eric Borenc27e7022020-03-09 08:43:45 -0400151 if !b.os("Android") && !b.extraConfig("MSAN") {
Eric Borena1613c92020-03-02 12:55:38 -0500152 args = append(args, "--randomProcessorTest")
153 }
154
Eric Borenc27e7022020-03-09 08:43:45 -0400155 if b.model("Pixel3", "Pixel3a") && b.extraConfig("Vulkan") {
Eric Borena1613c92020-03-02 12:55:38 -0500156 args = append(args, "--dontReduceOpsTaskSplitting")
157 }
158
159 threadLimit := -1
160 const MAIN_THREAD_ONLY = 0
161
162 // 32-bit desktop bots tend to run out of memory, because they have relatively
163 // far more cores than RAM (e.g. 32 cores, 3G RAM). Hold them back a bit.
Eric Borenc27e7022020-03-09 08:43:45 -0400164 if b.arch("x86") {
Eric Borena1613c92020-03-02 12:55:38 -0500165 threadLimit = 4
166 }
167
168 // These bots run out of memory easily.
Eric Borenc27e7022020-03-09 08:43:45 -0400169 if b.model("MotoG4", "Nexus7") {
Eric Borena1613c92020-03-02 12:55:38 -0500170 threadLimit = MAIN_THREAD_ONLY
171 }
172
173 // Avoid issues with dynamically exceeding resource cache limits.
Eric Borenc27e7022020-03-09 08:43:45 -0400174 if b.matchExtraConfig("DISCARDABLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500175 threadLimit = MAIN_THREAD_ONLY
176 }
177
178 if threadLimit >= 0 {
179 args = append(args, "--threads", strconv.Itoa(threadLimit))
180 }
181
182 sampleCount := 0
183 glPrefix := ""
Eric Borenc27e7022020-03-09 08:43:45 -0400184 if b.extraConfig("SwiftShader") {
Eric Borena1613c92020-03-02 12:55:38 -0500185 configs = append(configs, "gles", "glesdft")
186 args = append(args, "--disableDriverCorrectnessWorkarounds")
Eric Borenc27e7022020-03-09 08:43:45 -0400187 } else if b.cpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500188 args = append(args, "--nogpu")
189
190 configs = append(configs, "8888")
191
Mike Klein4ba8d1f2020-04-07 12:14:48 -0500192 if b.extraConfig("SkVM") {
193 args = append(args, "--skvm")
194 }
195
Eric Borenc27e7022020-03-09 08:43:45 -0400196 if b.extraConfig("BonusConfigs") {
Eric Borena1613c92020-03-02 12:55:38 -0500197 configs = []string{
198 "g8", "565",
199 "pic-8888", "serialize-8888",
200 "f16", "srgb", "esrgb", "narrow", "enarrow",
201 "p3", "ep3", "rec2020", "erec2020"}
202 }
203
Eric Borenc27e7022020-03-09 08:43:45 -0400204 if b.extraConfig("PDF") {
Eric Borena1613c92020-03-02 12:55:38 -0500205 configs = []string{"pdf"}
206 args = append(args, "--rasterize_pdf") // Works only on Mac.
207 // Take ~forever to rasterize:
208 blacklist("pdf gm _ lattice2")
209 blacklist("pdf gm _ hairmodes")
210 blacklist("pdf gm _ longpathdash")
211 }
212
Eric Borenc27e7022020-03-09 08:43:45 -0400213 } else if b.gpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500214 args = append(args, "--nocpu")
215
216 // Add in either gles or gl configs to the canonical set based on OS
217 sampleCount = 8
218 glPrefix = "gl"
Eric Borenc27e7022020-03-09 08:43:45 -0400219 if b.os("Android", "iOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500220 sampleCount = 4
221 // We want to test the OpenGL config not the GLES config on the Shield
Eric Borenc27e7022020-03-09 08:43:45 -0400222 if !b.model("NVIDIA_Shield") {
Eric Borena1613c92020-03-02 12:55:38 -0500223 glPrefix = "gles"
224 }
225 // MSAA is disabled on Pixel3a (https://b.corp.google.com/issues/143074513).
Eric Borenc27e7022020-03-09 08:43:45 -0400226 if b.model("Pixel3a") {
Eric Borena1613c92020-03-02 12:55:38 -0500227 sampleCount = 0
228 }
Eric Borenc27e7022020-03-09 08:43:45 -0400229 } else if b.matchGpu("Intel") {
Eric Borena1613c92020-03-02 12:55:38 -0500230 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926
231 sampleCount = 0
Eric Borenc27e7022020-03-09 08:43:45 -0400232 } else if b.os("ChromeOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500233 glPrefix = "gles"
234 }
235
Eric Borenc27e7022020-03-09 08:43:45 -0400236 if b.extraConfig("NativeFonts") {
Eric Borena1613c92020-03-02 12:55:38 -0500237 configs = append(configs, glPrefix)
238 } else {
239 configs = append(configs, glPrefix, glPrefix+"dft", glPrefix+"srgb")
240 if sampleCount > 0 {
241 configs = append(configs, fmt.Sprintf("%smsaa%d", glPrefix, sampleCount))
242 }
243 }
244
245 // The Tegra3 doesn't support MSAA
Eric Borenc27e7022020-03-09 08:43:45 -0400246 if b.gpu("Tegra3") ||
Eric Borena1613c92020-03-02 12:55:38 -0500247 // We aren't interested in fixing msaa bugs on current iOS devices.
Eric Borenc27e7022020-03-09 08:43:45 -0400248 b.model("iPad4", "iPadPro", "iPhone6", "iPhone7") ||
Eric Borena1613c92020-03-02 12:55:38 -0500249 // skia:5792
Eric Borenc27e7022020-03-09 08:43:45 -0400250 b.gpu("IntelHD530", "IntelIris540") {
Eric Borena1613c92020-03-02 12:55:38 -0500251 configs = removeContains(configs, "msaa")
252 }
253
254 // We want to test both the OpenGL config and the GLES config on Linux Intel:
255 // GL is used by Chrome, GLES is used by ChromeOS.
256 // Also do the Ganesh threading verification test (render with and without
257 // worker threads, using only the SW path renderer, and compare the results).
Eric Borenc27e7022020-03-09 08:43:45 -0400258 if b.matchGpu("Intel") && b.isLinux() {
Eric Borena1613c92020-03-02 12:55:38 -0500259 configs = append(configs, "gles", "glesdft", "glessrgb", "gltestthreading")
260 // skbug.com/6333, skbug.com/6419, skbug.com/6702
261 blacklist("gltestthreading gm _ lcdblendmodes")
262 blacklist("gltestthreading gm _ lcdoverlap")
263 blacklist("gltestthreading gm _ textbloblooper")
264 // All of these GMs are flaky, too:
265 blacklist("gltestthreading gm _ bleed_alpha_bmp")
266 blacklist("gltestthreading gm _ bleed_alpha_bmp_shader")
267 blacklist("gltestthreading gm _ bleed_alpha_image")
268 blacklist("gltestthreading gm _ bleed_alpha_image_shader")
269 blacklist("gltestthreading gm _ savelayer_with_backdrop")
270 blacklist("gltestthreading gm _ persp_shaders_bw")
271 blacklist("gltestthreading gm _ dftext_blob_persp")
272 blacklist("gltestthreading gm _ dftext")
273 // skbug.com/7523 - Flaky on various GPUs
274 blacklist("gltestthreading gm _ orientation")
275 // These GMs only differ in the low bits
276 blacklist("gltestthreading gm _ stroketext")
277 blacklist("gltestthreading gm _ draw_image_set")
278 }
279
280 // CommandBuffer bot *only* runs the command_buffer config.
Eric Borenc27e7022020-03-09 08:43:45 -0400281 if b.extraConfig("CommandBuffer") {
Eric Borena1613c92020-03-02 12:55:38 -0500282 configs = []string{"commandbuffer"}
283 }
284
Brian Salomon414782d2020-04-17 09:34:17 -0400285 // Dawn bot *only* runs the dawn config
Brian Salomon46994e02020-03-31 19:43:29 -0400286 if b.extraConfig("Dawn") {
287 configs = []string{"dawn"}
288 }
289
Brian Salomon414782d2020-04-17 09:34:17 -0400290 // ANGLE bot *only* runs the angle configs
Eric Borenc27e7022020-03-09 08:43:45 -0400291 if b.extraConfig("ANGLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500292 configs = []string{"angle_d3d11_es2",
Eric Borena1613c92020-03-02 12:55:38 -0500293 "angle_gl_es2",
294 "angle_d3d11_es3"}
295 if sampleCount > 0 {
296 configs = append(configs, fmt.Sprintf("angle_d3d11_es2_msaa%d", sampleCount))
297 configs = append(configs, fmt.Sprintf("angle_d3d11_es3_msaa%d", sampleCount))
298 }
Eric Borenc27e7022020-03-09 08:43:45 -0400299 if b.model("LenovoYogaC630") {
Eric Borena1613c92020-03-02 12:55:38 -0500300 // LenovoYogaC630 only supports D3D11, and to save time, we only test ES3
301 configs = []string{
302 "angle_d3d11_es3",
303 fmt.Sprintf("angle_d3d11_es3_msaa%d", sampleCount),
304 }
305 }
Eric Borenc27e7022020-03-09 08:43:45 -0400306 if b.matchGpu("GTX", "Quadro") {
Eric Borena1613c92020-03-02 12:55:38 -0500307 // See skia:7823 and chromium:693090.
308 configs = append(configs, "angle_gl_es3")
309 if sampleCount > 0 {
310 configs = append(configs, fmt.Sprintf("angle_gl_es2_msaa%d", sampleCount))
311 configs = append(configs, fmt.Sprintf("angle_gl_es3_msaa%d", sampleCount))
312 }
313 }
Brian Salomon414782d2020-04-17 09:34:17 -0400314 if !b.matchGpu("GTX", "Quadro", "GT610") {
315 // See skia:10149
316 configs = append(configs, "angle_d3d9_es2")
317 }
Eric Borenc27e7022020-03-09 08:43:45 -0400318 if b.model("NUC5i7RYH") {
Eric Borena1613c92020-03-02 12:55:38 -0500319 // skbug.com/7376
320 blacklist("_ test _ ProcessorCloneTest")
321 }
322 }
323
Eric Borenc27e7022020-03-09 08:43:45 -0400324 if b.model("AndroidOne", "GalaxyS6") || (b.model("Nexus5", "Nexus7")) {
Eric Borena1613c92020-03-02 12:55:38 -0500325 // skbug.com/9019
326 blacklist("_ test _ ProcessorCloneTest")
327 blacklist("_ test _ Programs")
328 blacklist("_ test _ ProcessorOptimizationValidationTest")
329 }
330
Eric Borenc27e7022020-03-09 08:43:45 -0400331 if b.extraConfig("CommandBuffer") && b.model("MacBook10.1") {
Eric Borena1613c92020-03-02 12:55:38 -0500332 // skbug.com/9235
333 blacklist("_ test _ Programs")
334 }
335
336 // skbug.com/9033 - these devices run out of memory on this test
337 // when opList splitting reduction is enabled
Eric Borenc27e7022020-03-09 08:43:45 -0400338 if b.gpu() && (b.model("Nexus7", "NVIDIA_Shield", "Nexus5x") ||
339 (b.os("Win10") && b.gpu("GTX660") && b.extraConfig("Vulkan"))) {
Eric Borena1613c92020-03-02 12:55:38 -0500340 blacklist("_", "gm", "_", "savelayer_clipmask")
341 }
342
343 // skbug.com/9123
Eric Borenc27e7022020-03-09 08:43:45 -0400344 if b.extraConfig("CommandBuffer") && b.gpu("IntelIris5100") {
Eric Borena1613c92020-03-02 12:55:38 -0500345 blacklist("_", "test", "_", "AsyncReadPixels")
346 }
347
348 // skbug.com/9043 - these devices render this test incorrectly
349 // when opList splitting reduction is enabled
Eric Borenc27e7022020-03-09 08:43:45 -0400350 if b.gpu() && b.extraConfig("Vulkan") && (b.gpu("RadeonR9M470X", "RadeonHD7770")) {
Eric Borena1613c92020-03-02 12:55:38 -0500351 blacklist("_", "tests", "_", "VkDrawableImportTest")
352 }
Eric Borenc27e7022020-03-09 08:43:45 -0400353 if b.extraConfig("Vulkan") {
Eric Borena1613c92020-03-02 12:55:38 -0500354 configs = []string{"vk"}
Eric Borenc27e7022020-03-09 08:43:45 -0400355 if b.os("Android") {
Eric Borena1613c92020-03-02 12:55:38 -0500356 configs = append(configs, "vkmsaa4")
357 } else {
358 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926, skia:9023
Eric Borenc27e7022020-03-09 08:43:45 -0400359 if !b.matchGpu("Intel") {
Eric Borena1613c92020-03-02 12:55:38 -0500360 configs = append(configs, "vkmsaa8")
361 }
362 }
363 }
Eric Borenc27e7022020-03-09 08:43:45 -0400364 if b.extraConfig("Metal") {
Eric Borena1613c92020-03-02 12:55:38 -0500365 configs = []string{"mtl"}
Eric Borenc27e7022020-03-09 08:43:45 -0400366 if b.os("iOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500367 configs = append(configs, "mtlmsaa4")
368 } else {
369 // MSAA doesn't work well on Intel GPUs chromium:527565, chromium:983926
Eric Borenc27e7022020-03-09 08:43:45 -0400370 if !b.matchGpu("Intel") {
Eric Borena1613c92020-03-02 12:55:38 -0500371 configs = append(configs, "mtlmsaa8")
372 }
373 }
374 }
375
376 // Test 1010102 on our Linux/NVIDIA bots and the persistent cache config
377 // on the GL bots.
Eric Borenc27e7022020-03-09 08:43:45 -0400378 if b.gpu("QuadroP400") && !b.extraConfig("PreAbandonGpuContext") && !b.extraConfig("TSAN") && b.isLinux() {
379 if b.extraConfig("Vulkan") {
Eric Borena1613c92020-03-02 12:55:38 -0500380 configs = append(configs, "vk1010102")
381 // Decoding transparent images to 1010102 just looks bad
382 blacklist("vk1010102 image _ _")
383 } else {
384 configs = append(configs, "gl1010102", "gltestpersistentcache", "gltestglslcache", "gltestprecompile")
385 // Decoding transparent images to 1010102 just looks bad
386 blacklist("gl1010102 image _ _")
387 // These tests produce slightly different pixels run to run on NV.
388 blacklist("gltestpersistentcache gm _ atlastext")
389 blacklist("gltestpersistentcache gm _ dftext")
390 blacklist("gltestpersistentcache gm _ glyph_pos_h_b")
391 blacklist("gltestglslcache gm _ atlastext")
392 blacklist("gltestglslcache gm _ dftext")
393 blacklist("gltestglslcache gm _ glyph_pos_h_b")
394 blacklist("gltestprecompile gm _ atlastext")
395 blacklist("gltestprecompile gm _ dftext")
396 blacklist("gltestprecompile gm _ glyph_pos_h_b")
397 // Tessellation shaders do not yet participate in the persistent cache.
398 blacklist("gltestpersistentcache gm _ tessellation")
399 blacklist("gltestglslcache gm _ tessellation")
400 blacklist("gltestprecompile gm _ tessellation")
401 }
402 }
403
404 // We also test the SkSL precompile config on Pixel2XL as a representative
405 // Android device - this feature is primarily used by Flutter.
Eric Borenc27e7022020-03-09 08:43:45 -0400406 if b.model("Pixel2XL") && !b.extraConfig("Vulkan") {
Eric Borena1613c92020-03-02 12:55:38 -0500407 configs = append(configs, "glestestprecompile")
408 }
409
410 // Test rendering to wrapped dsts on a few bots
411 // Also test "glenarrow", which hits F16 surfaces and F16 vertex colors.
Eric Borenc27e7022020-03-09 08:43:45 -0400412 if b.extraConfig("BonusConfigs") {
Eric Borena1613c92020-03-02 12:55:38 -0500413 configs = []string{"glbetex", "glbert", "glenarrow"}
414 }
415
Eric Borenc27e7022020-03-09 08:43:45 -0400416 if b.os("ChromeOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500417 // Just run GLES for now - maybe add gles_msaa4 in the future
418 configs = []string{"gles"}
419 }
420
421 // Test coverage counting path renderer.
Eric Borenc27e7022020-03-09 08:43:45 -0400422 if b.extraConfig("CCPR") {
Eric Borena1613c92020-03-02 12:55:38 -0500423 configs = filter(configs, "gl", "gles")
424 args = append(args, "--pr", "ccpr", "--cc", "true", "--cachePathMasks", "false")
425 }
426
427 // Test GPU tessellation path renderer.
Eric Borenc27e7022020-03-09 08:43:45 -0400428 if b.extraConfig("GpuTess") {
Eric Borena1613c92020-03-02 12:55:38 -0500429 configs = []string{glPrefix + "msaa4"}
Chris Dalton0a22b1e2020-03-26 11:52:15 -0600430 args = append(args, "--pr", "tess")
Eric Borena1613c92020-03-02 12:55:38 -0500431 }
432
433 // Test non-nvpr on NVIDIA.
Eric Borenc27e7022020-03-09 08:43:45 -0400434 if b.extraConfig("NonNVPR") {
Eric Borena1613c92020-03-02 12:55:38 -0500435 configs = []string{"gl", "glmsaa4"}
436 args = append(args, "--pr", "~nvpr")
437 }
438
439 // DDL is a GPU-only feature
Eric Borenc27e7022020-03-09 08:43:45 -0400440 if b.extraConfig("DDL1") {
Eric Borena1613c92020-03-02 12:55:38 -0500441 // This bot generates gl and vk comparison images for the large skps
442 configs = filter(configs, "gl", "vk", "mtl")
443 args = append(args, "--skpViewportSize", "2048")
444 args = append(args, "--pr", "~small")
445 }
Eric Borenc27e7022020-03-09 08:43:45 -0400446 if b.extraConfig("DDL3") {
Eric Borena1613c92020-03-02 12:55:38 -0500447 // This bot generates the ddl-gl and ddl-vk images for the
448 // large skps and the gms
449 ddlConfigs := prefix(filter(configs, "gl", "vk", "mtl"), "ddl-")
450 ddl2Configs := prefix(filter(configs, "gl", "vk", "mtl"), "ddl2-")
451 configs = append(ddlConfigs, ddl2Configs...)
452 args = append(args, "--skpViewportSize", "2048")
453 args = append(args, "--gpuThreads", "0")
454 }
455 }
456
457 // Sharding.
Eric Borenc27e7022020-03-09 08:43:45 -0400458 tf := b.parts["test_filter"]
Eric Borena1613c92020-03-02 12:55:38 -0500459 if tf != "" && tf != "All" {
460 // Expected format: shard_XX_YY
461 split := strings.Split(tf, "_")
462 if len(split) == 3 {
463 args = append(args, "--shard", split[1])
464 args = append(args, "--shards", split[2])
465 } else {
466 glog.Fatalf("Invalid task name - bad shards: %s", tf)
467 }
468 }
469
470 args = append(args, "--config")
471 args = append(args, configs...)
472
473 removeFromArgs := func(arg string) {
474 args = remove(args, arg)
475 }
476
477 // Run tests, gms, and image decoding tests everywhere.
478 args = append(args, "--src", "tests", "gm", "image", "lottie", "colorImage", "svg", "skp")
Eric Borenc27e7022020-03-09 08:43:45 -0400479 if b.gpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500480 // Don't run the "svgparse_*" svgs on GPU.
481 blacklist("_ svg _ svgparse_")
Weston Tracey24627882020-04-06 21:27:14 -0400482 } else if b.Name == "Test-Debian10-Clang-GCE-CPU-AVX2-x86_64-Debug-All-ASAN" {
Eric Borena1613c92020-03-02 12:55:38 -0500483 // Only run the CPU SVGs on 8888.
484 blacklist("~8888 svg _ _")
485 } else {
486 // On CPU SVGs we only care about parsing. Only run them on the above bot.
487 removeFromArgs("svg")
488 }
489
490 // Eventually I'd like these to pass, but for now just skip 'em.
Eric Borenc27e7022020-03-09 08:43:45 -0400491 if b.extraConfig("SK_FORCE_RASTER_PIPELINE_BLITTER") {
Eric Borena1613c92020-03-02 12:55:38 -0500492 removeFromArgs("tests")
493 }
494
Eric Borenc27e7022020-03-09 08:43:45 -0400495 if b.extraConfig("NativeFonts") { // images won't exercise native font integration :)
Eric Borena1613c92020-03-02 12:55:38 -0500496 removeFromArgs("image")
497 removeFromArgs("colorImage")
498 }
499
Eric Borenc27e7022020-03-09 08:43:45 -0400500 if b.matchExtraConfig("DDL", "PDF") {
Eric Borena1613c92020-03-02 12:55:38 -0500501 // The DDL and PDF bots just render the large skps and the gms
502 removeFromArgs("tests")
503 removeFromArgs("image")
504 removeFromArgs("colorImage")
505 removeFromArgs("svg")
506 } else {
507 // No other bots render the .skps.
508 removeFromArgs("skp")
509 }
510
Eric Borenc27e7022020-03-09 08:43:45 -0400511 if b.extraConfig("Lottie") {
Eric Borena1613c92020-03-02 12:55:38 -0500512 // Only run the lotties on Lottie bots.
513 removeFromArgs("tests")
514 removeFromArgs("gm")
515 removeFromArgs("image")
516 removeFromArgs("colorImage")
517 removeFromArgs("svg")
518 removeFromArgs("skp")
519 } else {
520 removeFromArgs("lottie")
521 }
522
523 // TODO: ???
524 blacklist("f16 _ _ dstreadshuffle")
525 blacklist("glsrgb image _ _")
526 blacklist("glessrgb image _ _")
527
528 // --src image --config g8 means "decode into Gray8", which isn't supported.
529 blacklist("g8 image _ _")
530 blacklist("g8 colorImage _ _")
531
Eric Borenc27e7022020-03-09 08:43:45 -0400532 if b.extraConfig("Valgrind") {
Eric Borena1613c92020-03-02 12:55:38 -0500533 // These take 18+ hours to run.
534 blacklist("pdf gm _ fontmgr_iter")
535 blacklist("pdf _ _ PANO_20121023_214540.jpg")
536 blacklist("pdf skp _ worldjournal")
537 blacklist("pdf skp _ desk_baidu.skp")
538 blacklist("pdf skp _ desk_wikipedia.skp")
539 blacklist("_ svg _ _")
540 // skbug.com/9171 and 8847
541 blacklist("_ test _ InitialTextureClear")
542 }
543
Eric Borenc27e7022020-03-09 08:43:45 -0400544 if b.model("TecnoSpark3Pro") {
Eric Borena1613c92020-03-02 12:55:38 -0500545 // skbug.com/9421
546 blacklist("_ test _ InitialTextureClear")
547 }
548
Eric Borenc27e7022020-03-09 08:43:45 -0400549 if b.os("iOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500550 blacklist(glPrefix + " skp _ _")
551 }
552
Eric Borenc27e7022020-03-09 08:43:45 -0400553 if b.matchOs("Mac", "iOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500554 // CG fails on questionable bmps
555 blacklist("_ image gen_platf rgba32abf.bmp")
556 blacklist("_ image gen_platf rgb24prof.bmp")
557 blacklist("_ image gen_platf rgb24lprof.bmp")
558 blacklist("_ image gen_platf 8bpp-pixeldata-cropped.bmp")
559 blacklist("_ image gen_platf 4bpp-pixeldata-cropped.bmp")
560 blacklist("_ image gen_platf 32bpp-pixeldata-cropped.bmp")
561 blacklist("_ image gen_platf 24bpp-pixeldata-cropped.bmp")
562
563 // CG has unpredictable behavior on this questionable gif
564 // It's probably using uninitialized memory
565 blacklist("_ image gen_platf frame_larger_than_image.gif")
566
567 // CG has unpredictable behavior on incomplete pngs
568 // skbug.com/5774
569 blacklist("_ image gen_platf inc0.png")
570 blacklist("_ image gen_platf inc1.png")
571 blacklist("_ image gen_platf inc2.png")
572 blacklist("_ image gen_platf inc3.png")
573 blacklist("_ image gen_platf inc4.png")
574 blacklist("_ image gen_platf inc5.png")
575 blacklist("_ image gen_platf inc6.png")
576 blacklist("_ image gen_platf inc7.png")
577 blacklist("_ image gen_platf inc8.png")
578 blacklist("_ image gen_platf inc9.png")
579 blacklist("_ image gen_platf inc10.png")
580 blacklist("_ image gen_platf inc11.png")
581 blacklist("_ image gen_platf inc12.png")
582 blacklist("_ image gen_platf inc13.png")
583 blacklist("_ image gen_platf inc14.png")
584 blacklist("_ image gen_platf incInterlaced.png")
585
586 // These images fail after Mac 10.13.1 upgrade.
587 blacklist("_ image gen_platf incInterlaced.gif")
588 blacklist("_ image gen_platf inc1.gif")
589 blacklist("_ image gen_platf inc0.gif")
590 blacklist("_ image gen_platf butterfly.gif")
591 }
592
593 // WIC fails on questionable bmps
Eric Borenc27e7022020-03-09 08:43:45 -0400594 if b.matchOs("Win") {
Eric Borena1613c92020-03-02 12:55:38 -0500595 blacklist("_ image gen_platf pal8os2v2.bmp")
596 blacklist("_ image gen_platf pal8os2v2-16.bmp")
597 blacklist("_ image gen_platf rgba32abf.bmp")
598 blacklist("_ image gen_platf rgb24prof.bmp")
599 blacklist("_ image gen_platf rgb24lprof.bmp")
600 blacklist("_ image gen_platf 8bpp-pixeldata-cropped.bmp")
601 blacklist("_ image gen_platf 4bpp-pixeldata-cropped.bmp")
602 blacklist("_ image gen_platf 32bpp-pixeldata-cropped.bmp")
603 blacklist("_ image gen_platf 24bpp-pixeldata-cropped.bmp")
Eric Borenc27e7022020-03-09 08:43:45 -0400604 if b.arch("x86_64") && b.cpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500605 // This GM triggers a SkSmallAllocator assert.
606 blacklist("_ gm _ composeshader_bitmap")
607 }
608 }
609
Eric Borenc27e7022020-03-09 08:43:45 -0400610 if b.matchOs("Win", "Mac") {
Eric Borena1613c92020-03-02 12:55:38 -0500611 // WIC and CG fail on arithmetic jpegs
612 blacklist("_ image gen_platf testimgari.jpg")
613 // More questionable bmps that fail on Mac, too. skbug.com/6984
614 blacklist("_ image gen_platf rle8-height-negative.bmp")
615 blacklist("_ image gen_platf rle4-height-negative.bmp")
616 }
617
618 // These PNGs have CRC errors. The platform generators seem to draw
619 // uninitialized memory without reporting an error, so skip them to
620 // avoid lots of images on Gold.
621 blacklist("_ image gen_platf error")
622
Eric Borenc27e7022020-03-09 08:43:45 -0400623 if b.os("Android", "iOS") {
Eric Borena1613c92020-03-02 12:55:38 -0500624 // This test crashes the N9 (perhaps because of large malloc/frees). It also
625 // is fairly slow and not platform-specific. So we just disable it on all of
626 // Android and iOS. skia:5438
Michael Ludwigf3f08af2020-04-16 11:39:31 -0400627 blacklist("_ test _ GrStyledShape")
Eric Borena1613c92020-03-02 12:55:38 -0500628 }
629
630 if internalHardwareLabel == "5" {
631 // http://b/118312149#comment9
632 blacklist("_ test _ SRGBReadWritePixels")
633 }
634
635 // skia:4095
636 badSerializeGMs := []string{
637 "bleed_image",
638 "c_gms",
639 "colortype",
640 "colortype_xfermodes",
641 "drawfilter",
642 "fontmgr_bounds_0.75_0",
643 "fontmgr_bounds_1_-0.25",
644 "fontmgr_bounds",
645 "fontmgr_match",
646 "fontmgr_iter",
647 "imagemasksubset",
648 "wacky_yuv_formats_domain",
649 "imagemakewithfilter",
650 "imagemakewithfilter_crop",
651 "imagemakewithfilter_crop_ref",
652 "imagemakewithfilter_ref",
653 }
654
655 // skia:5589
656 badSerializeGMs = append(badSerializeGMs,
657 "bitmapfilters",
658 "bitmapshaders",
659 "bleed",
660 "bleed_alpha_bmp",
661 "bleed_alpha_bmp_shader",
662 "convex_poly_clip",
663 "extractalpha",
664 "filterbitmap_checkerboard_32_32_g8",
665 "filterbitmap_image_mandrill_64",
666 "shadows",
667 "simpleaaclip_aaclip",
668 )
669
670 // skia:5595
671 badSerializeGMs = append(badSerializeGMs,
672 "composeshader_bitmap",
673 "scaled_tilemodes_npot",
674 "scaled_tilemodes",
675 )
676
677 // skia:5778
678 badSerializeGMs = append(badSerializeGMs, "typefacerendering_pfaMac")
679 // skia:5942
680 badSerializeGMs = append(badSerializeGMs, "parsedpaths")
681
682 // these use a custom image generator which doesn't serialize
683 badSerializeGMs = append(badSerializeGMs, "ImageGeneratorExternal_rect")
684 badSerializeGMs = append(badSerializeGMs, "ImageGeneratorExternal_shader")
685
686 // skia:6189
687 badSerializeGMs = append(badSerializeGMs, "shadow_utils")
688
689 // skia:7938
690 badSerializeGMs = append(badSerializeGMs, "persp_images")
691
692 // Not expected to round trip encoding/decoding.
693 badSerializeGMs = append(badSerializeGMs, "all_bitmap_configs")
694 badSerializeGMs = append(badSerializeGMs, "makecolorspace")
695 badSerializeGMs = append(badSerializeGMs, "readpixels")
696 badSerializeGMs = append(badSerializeGMs, "draw_image_set_rect_to_rect")
697 badSerializeGMs = append(badSerializeGMs, "compositor_quads_shader")
698 badSerializeGMs = append(badSerializeGMs, "wacky_yuv_formats_qtr")
699
700 // This GM forces a path to be convex. That property doesn't survive
701 // serialization.
702 badSerializeGMs = append(badSerializeGMs, "analytic_antialias_convex")
703
704 for _, test := range badSerializeGMs {
705 blacklist("serialize-8888", "gm", "_", test)
706 }
707
Eric Borenc27e7022020-03-09 08:43:45 -0400708 if !b.matchOs("Mac") {
Eric Borena1613c92020-03-02 12:55:38 -0500709 for _, test := range []string{"bleed_alpha_image", "bleed_alpha_image_shader"} {
710 blacklist("serialize-8888", "gm", "_", test)
711 }
712 }
713 // It looks like we skip these only for out-of-memory concerns.
Eric Borenc27e7022020-03-09 08:43:45 -0400714 if b.matchOs("Win", "Android") {
Eric Borena1613c92020-03-02 12:55:38 -0500715 for _, test := range []string{"verylargebitmap", "verylarge_picture_image"} {
716 blacklist("serialize-8888", "gm", "_", test)
717 }
718 }
Eric Borenc27e7022020-03-09 08:43:45 -0400719 if b.matchOs("Mac") && b.cpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500720 // skia:6992
721 blacklist("pic-8888", "gm", "_", "encode-platform")
722 blacklist("serialize-8888", "gm", "_", "encode-platform")
723 }
724
725 // skia:4769
726 blacklist("pic-8888", "gm", "_", "drawfilter")
727
728 // skia:4703
729 for _, test := range []string{"image-cacherator-from-picture",
730 "image-cacherator-from-raster",
731 "image-cacherator-from-ctable"} {
732 blacklist("pic-8888", "gm", "_", test)
733 blacklist("serialize-8888", "gm", "_", test)
734 }
735
736 // GM that requires raster-backed canvas
737 for _, test := range []string{"complexclip4_bw", "complexclip4_aa", "p3",
738 "async_rescale_and_read_text_up_large",
739 "async_rescale_and_read_text_up",
740 "async_rescale_and_read_text_down",
741 "async_rescale_and_read_dog_up",
742 "async_rescale_and_read_dog_down",
743 "async_rescale_and_read_rose",
744 "async_rescale_and_read_no_bleed"} {
745 blacklist("pic-8888", "gm", "_", test)
746 blacklist("serialize-8888", "gm", "_", test)
747
748 // GM requires canvas->makeSurface() to return a valid surface.
749 // TODO(borenet): These should be just outside of this block but are
750 // left here to match the recipe which has an indentation bug.
751 blacklist("pic-8888", "gm", "_", "blurrect_compare")
752 blacklist("serialize-8888", "gm", "_", "blurrect_compare")
753 }
754
755 // Extensions for RAW images
756 r := []string{
757 "arw", "cr2", "dng", "nef", "nrw", "orf", "raf", "rw2", "pef", "srw",
758 "ARW", "CR2", "DNG", "NEF", "NRW", "ORF", "RAF", "RW2", "PEF", "SRW",
759 }
760
761 // skbug.com/4888
762 // Blacklist RAW images (and a few large PNGs) on GPU bots
763 // until we can resolve failures.
Eric Borenc27e7022020-03-09 08:43:45 -0400764 if b.gpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500765 blacklist("_ image _ interlaced1.png")
766 blacklist("_ image _ interlaced2.png")
767 blacklist("_ image _ interlaced3.png")
768 for _, rawExt := range r {
769 blacklist(fmt.Sprintf("_ image _ .%s", rawExt))
770 }
771 }
772
773 // Blacklist memory intensive tests on 32-bit bots.
Eric Borenc27e7022020-03-09 08:43:45 -0400774 if b.os("Win8") && b.arch("x86") {
Eric Borena1613c92020-03-02 12:55:38 -0500775 blacklist("_ image f16 _")
776 blacklist("_ image _ abnormal.wbmp")
777 blacklist("_ image _ interlaced1.png")
778 blacklist("_ image _ interlaced2.png")
779 blacklist("_ image _ interlaced3.png")
780 for _, rawExt := range r {
781 blacklist(fmt.Sprintf("_ image _ .%s", rawExt))
782 }
783 }
784
Eric Borenc27e7022020-03-09 08:43:45 -0400785 if b.model("Nexus5", "Nexus5x") && b.gpu() {
Eric Borena1613c92020-03-02 12:55:38 -0500786 // skia:5876
787 blacklist("_", "gm", "_", "encode-platform")
788 }
789
Eric Borenc27e7022020-03-09 08:43:45 -0400790 if b.model("AndroidOne") && b.gpu() { // skia:4697, skia:4704, skia:4694, skia:4705
Eric Borena1613c92020-03-02 12:55:38 -0500791 blacklist("_", "gm", "_", "bigblurs")
792 blacklist("_", "gm", "_", "bleed")
793 blacklist("_", "gm", "_", "bleed_alpha_bmp")
794 blacklist("_", "gm", "_", "bleed_alpha_bmp_shader")
795 blacklist("_", "gm", "_", "bleed_alpha_image")
796 blacklist("_", "gm", "_", "bleed_alpha_image_shader")
797 blacklist("_", "gm", "_", "bleed_image")
798 blacklist("_", "gm", "_", "dropshadowimagefilter")
799 blacklist("_", "gm", "_", "filterfastbounds")
800 blacklist(glPrefix, "gm", "_", "imageblurtiled")
801 blacklist("_", "gm", "_", "imagefiltersclipped")
802 blacklist("_", "gm", "_", "imagefiltersscaled")
803 blacklist("_", "gm", "_", "imageresizetiled")
804 blacklist("_", "gm", "_", "matrixconvolution")
805 blacklist("_", "gm", "_", "strokedlines")
806 if sampleCount > 0 {
807 glMsaaConfig := fmt.Sprintf("%smsaa%d", glPrefix, sampleCount)
808 blacklist(glMsaaConfig, "gm", "_", "imageblurtiled")
809 blacklist(glMsaaConfig, "gm", "_", "imagefiltersbase")
810 }
811 }
812
813 match := []string{}
Eric Borenc27e7022020-03-09 08:43:45 -0400814 if b.extraConfig("Valgrind") { // skia:3021
Eric Borena1613c92020-03-02 12:55:38 -0500815 match = append(match, "~Threaded")
816 }
817
Eric Borenc27e7022020-03-09 08:43:45 -0400818 if b.extraConfig("Valgrind") && b.extraConfig("PreAbandonGpuContext") {
Eric Borena1613c92020-03-02 12:55:38 -0500819 // skia:6575
820 match = append(match, "~multipicturedraw_")
821 }
822
Eric Borenc27e7022020-03-09 08:43:45 -0400823 if b.model("AndroidOne") {
Eric Borena1613c92020-03-02 12:55:38 -0500824 match = append(match, "~WritePixels") // skia:4711
825 match = append(match, "~PremulAlphaRoundTrip_Gpu") // skia:7501
826 match = append(match, "~ReimportImageTextureWithMipLevels") // skia:8090
827 }
828
Eric Borenc27e7022020-03-09 08:43:45 -0400829 if b.model("GalaxyS6") {
Eric Borena1613c92020-03-02 12:55:38 -0500830 match = append(match, "~SpecialImage") // skia:6338
831 match = append(match, "~skbug6653") // skia:6653
832 }
833
Eric Borenc27e7022020-03-09 08:43:45 -0400834 if b.extraConfig("MSAN") {
Eric Borena1613c92020-03-02 12:55:38 -0500835 match = append(match, "~Once", "~Shared") // Not sure what's up with these tests.
836 }
837
Eric Borenc27e7022020-03-09 08:43:45 -0400838 if b.extraConfig("TSAN") {
Eric Borena1613c92020-03-02 12:55:38 -0500839 match = append(match, "~ReadWriteAlpha") // Flaky on TSAN-covered on nvidia bots.
840 match = append(match, "~RGBA4444TextureTest", // Flakier than they are important.
841 "~RGB565TextureTest")
842 }
843
844 // By default, we test with GPU threading enabled, unless specifically
845 // disabled.
Eric Borenc27e7022020-03-09 08:43:45 -0400846 if b.extraConfig("NoGPUThreads") {
Eric Borena1613c92020-03-02 12:55:38 -0500847 args = append(args, "--gpuThreads", "0")
848 }
849
Eric Borenc27e7022020-03-09 08:43:45 -0400850 if b.extraConfig("Vulkan") && b.gpu("Adreno530") {
Eric Borena1613c92020-03-02 12:55:38 -0500851 // skia:5777
852 match = append(match, "~CopySurface")
853 }
854
Eric Borenc27e7022020-03-09 08:43:45 -0400855 if b.extraConfig("Vulkan") && b.matchGpu("Adreno") {
Eric Borena1613c92020-03-02 12:55:38 -0500856 // skia:7663
857 match = append(match, "~WritePixelsNonTextureMSAA_Gpu")
858 match = append(match, "~WritePixelsMSAA_Gpu")
859 }
860
Eric Borenc27e7022020-03-09 08:43:45 -0400861 if b.extraConfig("Vulkan") && b.isLinux() && b.gpu("IntelIris640") {
Eric Borena1613c92020-03-02 12:55:38 -0500862 match = append(match, "~VkHeapTests") // skia:6245
863 }
864
Eric Borenc27e7022020-03-09 08:43:45 -0400865 if b.isLinux() && b.gpu("IntelIris640") {
Eric Borena1613c92020-03-02 12:55:38 -0500866 match = append(match, "~Programs") // skia:7849
867 }
868
Eric Borenc27e7022020-03-09 08:43:45 -0400869 if b.model("TecnoSpark3Pro") {
Brian Osmanb883f7d2020-03-26 16:55:07 -0400870 // skia:9814
871 match = append(match, "~Programs")
872 match = append(match, "~ProcessorCloneTest")
873 match = append(match, "~ProcessorOptimizationValidationTest")
Eric Borena1613c92020-03-02 12:55:38 -0500874 }
875
Eric Borenc27e7022020-03-09 08:43:45 -0400876 if b.gpu("IntelIris640", "IntelHD615", "IntelHDGraphics615") {
Eric Borena1613c92020-03-02 12:55:38 -0500877 match = append(match, "~^SRGBReadWritePixels$") // skia:9225
878 }
879
Eric Borenc27e7022020-03-09 08:43:45 -0400880 if b.extraConfig("Vulkan") && b.isLinux() && b.gpu("IntelHD405") {
Eric Borena1613c92020-03-02 12:55:38 -0500881 // skia:7322
882 blacklist("vk", "gm", "_", "skbug_257")
883 blacklist("vk", "gm", "_", "filltypespersp")
884 match = append(match, "~^ClearOp$")
885 match = append(match, "~^CopySurface$")
886 match = append(match, "~^ImageNewShader_GPU$")
887 match = append(match, "~^InitialTextureClear$")
888 match = append(match, "~^PinnedImageTest$")
889 match = append(match, "~^ReadPixels_Gpu$")
890 match = append(match, "~^ReadPixels_Texture$")
891 match = append(match, "~^SRGBReadWritePixels$")
892 match = append(match, "~^VkUploadPixelsTests$")
893 match = append(match, "~^WritePixelsNonTexture_Gpu$")
894 match = append(match, "~^WritePixelsNonTextureMSAA_Gpu$")
895 match = append(match, "~^WritePixels_Gpu$")
896 match = append(match, "~^WritePixelsMSAA_Gpu$")
897 }
898
Eric Borenc27e7022020-03-09 08:43:45 -0400899 if b.extraConfig("Vulkan") && b.gpu("GTX660") && b.matchOs("Win") {
Eric Borena1613c92020-03-02 12:55:38 -0500900 // skbug.com/8047
901 match = append(match, "~FloatingPointTextureTest$")
902 }
903
Eric Borenc27e7022020-03-09 08:43:45 -0400904 if b.extraConfig("Metal") && b.gpu("RadeonHD8870M") && b.matchOs("Mac") {
Eric Borena1613c92020-03-02 12:55:38 -0500905 // skia:9255
906 match = append(match, "~WritePixelsNonTextureMSAA_Gpu")
907 }
908
Eric Borenc27e7022020-03-09 08:43:45 -0400909 if b.extraConfig("ANGLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500910 // skia:7835
911 match = append(match, "~BlurMaskBiggerThanDest")
912 }
913
Eric Borenc27e7022020-03-09 08:43:45 -0400914 if b.gpu("IntelIris6100") && b.extraConfig("ANGLE") && !b.debug() {
Eric Borena1613c92020-03-02 12:55:38 -0500915 // skia:7376
916 match = append(match, "~^ProcessorOptimizationValidationTest$")
917 }
918
Eric Borenc27e7022020-03-09 08:43:45 -0400919 if b.gpu("IntelIris6100", "IntelHD4400") && b.extraConfig("ANGLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500920 // skia:6857
921 blacklist("angle_d3d9_es2", "gm", "_", "lighting")
922 }
923
Eric Borenc27e7022020-03-09 08:43:45 -0400924 if b.gpu("PowerVRGX6250") {
Eric Borena1613c92020-03-02 12:55:38 -0500925 match = append(match, "~gradients_view_perspective_nodither") //skia:6972
926 }
927
Eric Borenc27e7022020-03-09 08:43:45 -0400928 if b.arch("arm") && b.extraConfig("ASAN") {
Eric Borena1613c92020-03-02 12:55:38 -0500929 // TODO: can we run with env allocator_may_return_null=1 instead?
930 match = append(match, "~BadImage")
931 }
932
Eric Borenc27e7022020-03-09 08:43:45 -0400933 if b.matchOs("Mac") && b.gpu("IntelHD6000") {
Eric Borena1613c92020-03-02 12:55:38 -0500934 // skia:7574
935 match = append(match, "~^ProcessorCloneTest$")
936 match = append(match, "~^GrMeshTest$")
937 }
938
Eric Borenc27e7022020-03-09 08:43:45 -0400939 if b.matchOs("Mac") && b.gpu("IntelHD615") {
Eric Borena1613c92020-03-02 12:55:38 -0500940 // skia:7603
941 match = append(match, "~^GrMeshTest$")
942 }
943
Eric Borenc27e7022020-03-09 08:43:45 -0400944 if b.model("LenovoYogaC630") && b.extraConfig("ANGLE") {
Eric Borena1613c92020-03-02 12:55:38 -0500945 // skia:9275
946 blacklist("_", "tests", "_", "Programs")
947 // skia:8976
948 blacklist("_", "tests", "_", "GrDefaultPathRendererTest")
949 // https://bugs.chromium.org/p/angleproject/issues/detail?id=3414
950 blacklist("_", "tests", "_", "PinnedImageTest")
951 }
952
953 if len(blacklisted) > 0 {
954 args = append(args, "--blacklist")
955 args = append(args, blacklisted...)
956 }
957
958 if len(match) > 0 {
959 args = append(args, "--match")
960 args = append(args, match...)
961 }
962
963 // These bots run out of memory running RAW codec tests. Do not run them in
964 // parallel
Eric Borenc27e7022020-03-09 08:43:45 -0400965 // TODO(borenet): Previously this was `'Nexus5' in bot or 'Nexus9' in bot`
966 // which also matched 'Nexus5x'. I added That here to maintain the
967 // existing behavior, but we should verify that it's needed.
968 if b.model("Nexus5", "Nexus5x", "Nexus9") {
Eric Borena1613c92020-03-02 12:55:38 -0500969 args = append(args, "--noRAW_threading")
970 }
971
Eric Borenc27e7022020-03-09 08:43:45 -0400972 if b.extraConfig("FSAA") {
Eric Borena1613c92020-03-02 12:55:38 -0500973 args = append(args, "--analyticAA", "false")
974 }
Eric Borenc27e7022020-03-09 08:43:45 -0400975 if b.extraConfig("FAAA") {
Eric Borena1613c92020-03-02 12:55:38 -0500976 args = append(args, "--forceAnalyticAA")
977 }
978
Eric Borenc27e7022020-03-09 08:43:45 -0400979 if !b.extraConfig("NativeFonts") {
Eric Borena1613c92020-03-02 12:55:38 -0500980 args = append(args, "--nonativeFonts")
981 }
982
Eric Borenc27e7022020-03-09 08:43:45 -0400983 if b.extraConfig("GDI") {
Eric Borena1613c92020-03-02 12:55:38 -0500984 args = append(args, "--gdi")
985 }
986
987 // Let's make all bots produce verbose output by default.
988 args = append(args, "--verbose")
989
990 // See skia:2789.
Eric Borenc27e7022020-03-09 08:43:45 -0400991 if b.extraConfig("AbandonGpuContext") {
Eric Borena1613c92020-03-02 12:55:38 -0500992 args = append(args, "--abandonGpuContext")
993 }
Eric Borenc27e7022020-03-09 08:43:45 -0400994 if b.extraConfig("PreAbandonGpuContext") {
Eric Borena1613c92020-03-02 12:55:38 -0500995 args = append(args, "--preAbandonGpuContext")
996 }
Eric Borenc27e7022020-03-09 08:43:45 -0400997 if b.extraConfig("ReleaseAndAbandonGpuContext") {
Eric Borena1613c92020-03-02 12:55:38 -0500998 args = append(args, "--releaseAndAbandonGpuContext")
999 }
Eric Boren457c1eb2020-03-16 13:49:33 -04001000
1001 // Finalize the DM flags and properties.
1002 b.recipeProp("dm_flags", marshalJson(args))
1003 b.recipeProp("dm_properties", marshalJson(properties))
Eric Boren59e74962020-03-23 09:17:24 -04001004
1005 // Add properties indicating which assets the task should use.
1006 if b.matchExtraConfig("Lottie") {
Eric Boren0f9d5bd2020-03-23 09:57:05 -04001007 b.asset("lottie-samples")
Eric Boren59e74962020-03-23 09:17:24 -04001008 b.recipeProp("lotties", "true")
1009 } else {
1010 b.asset("skimage")
1011 b.recipeProp("images", "true")
1012 b.asset("skp")
1013 b.recipeProp("skps", "true")
1014 b.asset("svg")
1015 b.recipeProp("svgs", "true")
1016 }
1017 b.recipeProp("do_upload", fmt.Sprintf("%t", b.doUpload()))
1018 b.recipeProp("resources", "true")
Eric Borena1613c92020-03-02 12:55:38 -05001019}