aboutsummaryrefslogtreecommitdiffhomepage
path: root/infra/bots/recipe_modules/vars
diff options
context:
space:
mode:
authorGravatar Yuqian Li <liyuqian@google.com>2017-10-16 12:24:43 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-10-16 17:33:40 +0000
commitc81aaaad0b1ea0cf77882a4b89adc5b9e58c05bb (patch)
tree600e0df9d03c67a2a52ae4c22f19848559aa4b46 /infra/bots/recipe_modules/vars
parentfa15877f487333bec876e7315cf584c0d598d098 (diff)
Try calmbench on bots
Bug: skia: Change-Id: I869776e3d9d47b4a1a11089f729a0b17581eb9f7 Reviewed-on: https://skia-review.googlesource.com/57400 Reviewed-by: Eric Boren <borenet@google.com> Commit-Queue: Yuqian Li <liyuqian@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/vars')
-rw-r--r--infra/bots/recipe_modules/vars/api.py5
-rw-r--r--infra/bots/recipe_modules/vars/examples/full.expected/Calmbench-Debian9.json35
-rw-r--r--infra/bots/recipe_modules/vars/examples/full.py1
3 files changed, 40 insertions, 1 deletions
diff --git a/infra/bots/recipe_modules/vars/api.py b/infra/bots/recipe_modules/vars/api.py
index eff8f21693..f43e6a99dd 100644
--- a/infra/bots/recipe_modules/vars/api.py
+++ b/infra/bots/recipe_modules/vars/api.py
@@ -41,6 +41,8 @@ class SkiaVarsApi(recipe_api.RecipeApi):
# Compile bots keep a persistent checkout.
if self.is_compile_bot:
self.persistent_checkout = True
+ if 'Calmbench' in self.builder_name:
+ self.persistent_checkout = True
if 'Housekeeper' in self.builder_name:
self.persistent_checkout = True
if '-CT_' in self.builder_name:
@@ -110,7 +112,8 @@ class SkiaVarsApi(recipe_api.RecipeApi):
self.builder_cfg = self.m.builder_name_schema.DictForBuilderName(
self.builder_name)
self.role = self.builder_cfg['role']
- if self.role == self.m.builder_name_schema.BUILDER_ROLE_HOUSEKEEPER:
+ if self.role in [self.m.builder_name_schema.BUILDER_ROLE_HOUSEKEEPER,
+ self.m.builder_name_schema.BUILDER_ROLE_CALMBENCH]:
self.configuration = CONFIG_RELEASE
else:
self.configuration = self.builder_cfg.get('configuration', CONFIG_DEBUG)
diff --git a/infra/bots/recipe_modules/vars/examples/full.expected/Calmbench-Debian9.json b/infra/bots/recipe_modules/vars/examples/full.expected/Calmbench-Debian9.json
new file mode 100644
index 0000000000..4594f9e6b9
--- /dev/null
+++ b/infra/bots/recipe_modules/vars/examples/full.expected/Calmbench-Debian9.json
@@ -0,0 +1,35 @@
+[
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "import os\nprint os.environ.get('SWARMING_BOT_ID', '')\n"
+ ],
+ "name": "get swarming bot id",
+ "stdout": "/path/to/tmp/",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@python.inline@import os@@@",
+ "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_BOT_ID', '')@@@",
+ "@@@STEP_LOG_END@python.inline@@@"
+ ]
+ },
+ {
+ "cmd": [
+ "python",
+ "-u",
+ "import os\nprint os.environ.get('SWARMING_TASK_ID', '')\n"
+ ],
+ "name": "get swarming task id",
+ "stdout": "/path/to/tmp/",
+ "~followup_annotations": [
+ "@@@STEP_LOG_LINE@python.inline@import os@@@",
+ "@@@STEP_LOG_LINE@python.inline@print os.environ.get('SWARMING_TASK_ID', '')@@@",
+ "@@@STEP_LOG_END@python.inline@@@"
+ ]
+ },
+ {
+ "name": "$result",
+ "recipe_result": null,
+ "status_code": 0
+ }
+] \ No newline at end of file
diff --git a/infra/bots/recipe_modules/vars/examples/full.py b/infra/bots/recipe_modules/vars/examples/full.py
index 013d0e309f..712e630cc2 100644
--- a/infra/bots/recipe_modules/vars/examples/full.py
+++ b/infra/bots/recipe_modules/vars/examples/full.py
@@ -31,6 +31,7 @@ TEST_BUILDERS = [
'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-ASAN',
'Perf-Ubuntu14-GCC-GCE-CPU-AVX2-x86_64-Release-All-CT_BENCH_1k_SKPs',
'Upload-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-Coverage',
+ 'Calmbench-Debian9'
]