aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra
diff options
context:
space:
mode:
authorGravatar Eric Boren <borenet@google.com>2017-09-15 14:09:07 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-15 18:32:03 +0000
commit4dc4aaf3f4e358b0187b716cf2c9bf88dc4a1c65 (patch)
tree81c88c5d1cd53ff69f5dbc23222c696262249a0b /infra
parentdbdc57cb405134db7f2dc146aa4ee7ad62d3b029 (diff)
[infra] Use int for internal_hardware_label
Bug: skia: Change-Id: I86c4160e0c65c9f8459087e34eaf39907a76c9da Reviewed-on: https://skia-review.googlesource.com/47182 Reviewed-by: Kevin Lubick <kjlubick@google.com> Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra')
-rw-r--r--infra/bots/gen_tasks.go8
-rw-r--r--infra/bots/recipes/test.py4
2 files changed, 6 insertions, 6 deletions
diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go
index 70c293873f..077c709a8a 100644
--- a/infra/bots/gen_tasks.go
+++ b/infra/bots/gen_tasks.go
@@ -62,7 +62,7 @@ var (
// internalHardwareLabelFn can be set in an init function to provide an
// internal_hardware_label variable to the recipe.
- internalHardwareLabelFn func(parts map[string]string) *string
+ internalHardwareLabelFn func(parts map[string]string) *int
// Defines the structure of job names.
jobNameSchema *JobNameSchema
@@ -87,7 +87,7 @@ var (
)
// internalHardwareLabel returns the internal ID for the bot, if any.
-func internalHardwareLabel(parts map[string]string) *string {
+func internalHardwareLabel(parts map[string]string) *int {
if internalHardwareLabelFn != nil {
return internalHardwareLabelFn(parts)
}
@@ -728,7 +728,7 @@ func test(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
}
iid := internalHardwareLabel(parts)
if iid != nil {
- s.ExtraArgs = append(s.ExtraArgs, fmt.Sprintf("internal_hardware_label=%s", *iid))
+ s.ExtraArgs = append(s.ExtraArgs, fmt.Sprintf("internal_hardware_label=%d", *iid))
}
b.MustAddTask(name, s)
@@ -822,7 +822,7 @@ func perf(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil
}
iid := internalHardwareLabel(parts)
if iid != nil {
- s.ExtraArgs = append(s.ExtraArgs, fmt.Sprintf("internal_hardware_label=%s", *iid))
+ s.ExtraArgs = append(s.ExtraArgs, fmt.Sprintf("internal_hardware_label=%d", *iid))
}
b.MustAddTask(name, s)
diff --git a/infra/bots/recipes/test.py b/infra/bots/recipes/test.py
index bbd80f220b..1f1a6e8d1d 100644
--- a/infra/bots/recipes/test.py
+++ b/infra/bots/recipes/test.py
@@ -233,7 +233,7 @@ def dm_flags(api, bot):
args.extend(['--pr', 'ccpr'])
# Bogus test for internal bot.
- if api.vars.internal_hardware_label == '0':
+ if api.vars.internal_hardware_label == 0:
args.append('--internal0')
args.append('--config')
@@ -1096,7 +1096,7 @@ def GenTests(api):
revision='abc123',
path_config='kitchen',
swarm_out_dir='[SWARM_OUT_DIR]',
- internal_hardware_label='0') +
+ internal_hardware_label=0) +
api.path.exists(
api.path['start_dir'].join('skia'),
api.path['start_dir'].join('skia', 'infra', 'bots', 'assets',