diff options
author | Eric Boren <borenet@google.com> | 2017-09-15 10:35:44 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-15 14:54:43 +0000 |
commit | fd4d60eac06132c6993e0c3e0da205b2b2fce88a (patch) | |
tree | 1a50bf9ece4a9b9050186fbdf9a2f2e899fb8ab3 /infra | |
parent | a32c47b0e2bbf5bca6f913581deed780165f8dc5 (diff) |
[infra] Rename internal_bot_id -> internal_hardware_label
Bug: skia:
Change-Id: I1a2442898c8eca8cf36d8e85d2acf1d048ebfb54
Reviewed-on: https://skia-review.googlesource.com/46849
Reviewed-by: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Ben Wagner <benjaminwagner@google.com>
Commit-Queue: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra')
-rw-r--r-- | infra/bots/gen_tasks.go | 22 | ||||
-rw-r--r-- | infra/bots/recipe_modules/vars/api.py | 5 | ||||
-rw-r--r-- | infra/bots/recipes/test.py | 4 |
3 files changed, 16 insertions, 15 deletions
diff --git a/infra/bots/gen_tasks.go b/infra/bots/gen_tasks.go index 8ae9e17b15..70c293873f 100644 --- a/infra/bots/gen_tasks.go +++ b/infra/bots/gen_tasks.go @@ -60,9 +60,9 @@ var ( // dimensions for the given task. alternateSwarmDimensions func(parts map[string]string) []string - // internalBotIdFn can be set in an init function to provide an - // internal_bot_id variable to the recipe. - internalBotIdFn func(parts map[string]string) *string + // 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 // Defines the structure of job names. jobNameSchema *JobNameSchema @@ -86,10 +86,10 @@ var ( jobsFile = flag.String("jobs", "", "JSON file containing jobs to run.") ) -// internalBotId returns the internal ID for the bot, if any. -func internalBotId(parts map[string]string) *string { - if internalBotIdFn != nil { - return internalBotIdFn(parts) +// internalHardwareLabel returns the internal ID for the bot, if any. +func internalHardwareLabel(parts map[string]string) *string { + if internalHardwareLabelFn != nil { + return internalHardwareLabelFn(parts) } return nil } @@ -726,9 +726,9 @@ func test(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil // skia:6737 s.ExecutionTimeout = 6 * time.Hour } - iid := internalBotId(parts) + iid := internalHardwareLabel(parts) if iid != nil { - s.ExtraArgs = append(s.ExtraArgs, fmt.Sprintf("internal_bot_id=%s", *iid)) + s.ExtraArgs = append(s.ExtraArgs, fmt.Sprintf("internal_hardware_label=%s", *iid)) } b.MustAddTask(name, s) @@ -820,9 +820,9 @@ func perf(b *specs.TasksCfgBuilder, name string, parts map[string]string, compil // skia:6737 s.ExecutionTimeout = 6 * time.Hour } - iid := internalBotId(parts) + iid := internalHardwareLabel(parts) if iid != nil { - s.ExtraArgs = append(s.ExtraArgs, fmt.Sprintf("internal_bot_id=%s", *iid)) + s.ExtraArgs = append(s.ExtraArgs, fmt.Sprintf("internal_hardware_label=%s", *iid)) } b.MustAddTask(name, s) diff --git a/infra/bots/recipe_modules/vars/api.py b/infra/bots/recipe_modules/vars/api.py index dde7d92dd9..1102b6955a 100644 --- a/infra/bots/recipe_modules/vars/api.py +++ b/infra/bots/recipe_modules/vars/api.py @@ -144,8 +144,9 @@ class SkiaVarsApi(recipe_api.RecipeApi): self.chromeos_homedir = '/home/chronos/user/' # Internal bot support. - self.internal_bot_id = self.m.properties.get('internal_bot_id') - self.is_internal_bot = self.internal_bot_id is not None + self.internal_hardware_label = ( + self.m.properties.get('internal_hardware_label')) + self.is_internal_bot = self.internal_hardware_label is not None @property def is_linux(self): diff --git a/infra/bots/recipes/test.py b/infra/bots/recipes/test.py index 8f60e8150b..bbd80f220b 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_bot_id == '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_bot_id='0') + + internal_hardware_label='0') + api.path.exists( api.path['start_dir'].join('skia'), api.path['start_dir'].join('skia', 'infra', 'bots', 'assets', |