[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>
This commit is contained in:
Eric Boren 2017-09-15 14:09:07 -04:00 committed by Skia Commit-Bot
parent dbdc57cb40
commit 4dc4aaf3f4
2 changed files with 6 additions and 6 deletions

View File

@ -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)

View File

@ -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',