aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots
diff options
context:
space:
mode:
authorGravatar Ben Wagner <benjaminwagner@google.com>2017-04-27 13:08:50 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-27 22:10:47 +0000
commit988d15effd06d62db1583f0bcee3511b18db418f (patch)
tree4277a9e12583e4c5b8f66dbc32c591748bfb1a39 /infra/bots
parentcd901046eaa7db876f2b501cfcf90c97fe6f64bf (diff)
[infra/bots] Treat extra_config as a list.
Dependency of https://skia-review.googlesource.com/c/14525/ No-Try: true Change-Id: I7686576aa48865116fe8a593f08d395f901a1d04 Reviewed-on: https://skia-review.googlesource.com/14524 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Ben Wagner <benjaminwagner@google.com>
Diffstat (limited to 'infra/bots')
-rw-r--r--infra/bots/gen_tasks.go35
-rw-r--r--infra/bots/recipes/perf.py3
-rw-r--r--infra/bots/recipes/test.py8
3 files changed, 24 insertions, 22 deletions
diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go
index 4a1ac7a351..a9e0e744ee 100644
--- a/infra/bots/gen_tasks.go
+++ b/infra/bots/gen_tasks.go
@@ -86,30 +86,31 @@ func deriveCompileTaskName(jobName string, parts map[string]string) string {
return "Build-Ubuntu-GCC-x86_64-Release-Shared"
} else if parts["role"] == "Test" || parts["role"] == "Perf" {
task_os := parts["os"]
- ec := parts["extra_config"]
- ec = strings.TrimSuffix(ec, "_Skpbench")
- ec = strings.TrimSuffix(ec, "_AbandonGpuContext")
- ec = strings.TrimSuffix(ec, "_PreAbandonGpuContext")
- if ec == "Valgrind" {
- // skia:6267
- ec = ""
- }
- if ec == "ReleaseAndAbandonGpuContext" {
- ec = ""
+ ec := []string{}
+ if val := parts["extra_config"]; val != "" {
+ ec = strings.Split(val, "_")
+ ignore := []string{"Skpbench", "AbandonGpuContext", "PreAbandonGpuContext", "Valgrind", "ReleaseAndAbandonGpuContext", "RaspberryPi"}
+ keep := make([]string, 0, len(ec))
+ for _, part := range ec {
+ if !util.In(part, ignore) {
+ keep = append(keep, part)
+ }
+ }
+ ec = keep
}
if task_os == "Android" {
- if ec == "Vulkan" {
- ec = "Android_Vulkan"
+ if !util.In("Android", ec) {
+ ec = append([]string{"Android"}, ec...)
}
task_os = "Ubuntu"
} else if task_os == "Chromecast" {
task_os = "Ubuntu"
- ec = "Chromecast"
+ ec = append([]string{"Chromecast"}, ec...)
} else if strings.Contains(task_os, "ChromeOS") {
- ec = "Chromebook_ARM_GLES"
+ ec = append([]string{"Chromebook", "ARM", "GLES"}, ec...)
task_os = "Ubuntu"
} else if task_os == "iOS" {
- ec = task_os
+ ec = append([]string{task_os}, ec...)
task_os = "Mac"
} else if strings.Contains(task_os, "Win") {
task_os = "Win"
@@ -123,8 +124,8 @@ func deriveCompileTaskName(jobName string, parts map[string]string) string {
"target_arch": parts["arch"],
"configuration": parts["configuration"],
}
- if ec != "" {
- jobNameMap["extra_config"] = ec
+ if len(ec) > 0 {
+ jobNameMap["extra_config"] = strings.Join(ec, "_")
}
name, err := jobNameSchema.MakeJobName(jobNameMap)
if err != nil {
diff --git a/infra/bots/recipes/perf.py b/infra/bots/recipes/perf.py
index 2d3cef03f9..f5a0254db8 100644
--- a/infra/bots/recipes/perf.py
+++ b/infra/bots/recipes/perf.py
@@ -280,7 +280,8 @@ def perf_steps(api):
})
# See skia:2789.
- if '_AbandonGpuContext' in api.vars.builder_cfg.get('extra_config', ''):
+ extra_config_parts = api.vars.builder_cfg.get('extra_config', '').split('_')
+ if 'AbandonGpuContext' in extra_config_parts:
args.extend(['--abandonGpuContext', '--nocpu'])
with api.env(env):
diff --git a/infra/bots/recipes/test.py b/infra/bots/recipes/test.py
index 4fbf7eb819..9449b01eac 100644
--- a/infra/bots/recipes/test.py
+++ b/infra/bots/recipes/test.py
@@ -676,12 +676,12 @@ def test_steps(api):
})
# See skia:2789.
- if '_AbandonGpuContext' in api.vars.builder_cfg.get('extra_config', ''):
+ extra_config_parts = api.vars.builder_cfg.get('extra_config', '').split('_')
+ if 'AbandonGpuContext' in extra_config_parts:
args.append('--abandonGpuContext')
- if '_PreAbandonGpuContext' in api.vars.builder_cfg.get('extra_config', ''):
+ if 'PreAbandonGpuContext' in extra_config_parts:
args.append('--preAbandonGpuContext')
- if ('ReleaseAndAbandonGpuContext' in
- api.vars.builder_cfg.get('extra_config', '')):
+ if 'ReleaseAndAbandonGpuContext' in extra_config_parts:
args.append('--releaseAndAbandonGpuContext')
with api.env(env):