diff options
Diffstat (limited to 'infra/bots/recipe_modules/vars')
14 files changed, 472 insertions, 4 deletions
diff --git a/infra/bots/recipe_modules/vars/__init__.py b/infra/bots/recipe_modules/vars/__init__.py index d5cf1da80b..e0e951379f 100644 --- a/infra/bots/recipe_modules/vars/__init__.py +++ b/infra/bots/recipe_modules/vars/__init__.py @@ -12,7 +12,3 @@ DEPS = [ 'recipe_engine/raw_io', 'recipe_engine/step', ] - - -# TODO(borenet): Add coverage -DISABLE_STRICT_COVERAGE = True diff --git a/infra/bots/recipe_modules/vars/example.expected/Build-Ubuntu-GCC-x86_64-Release-Flutter_Android.json b/infra/bots/recipe_modules/vars/example.expected/Build-Ubuntu-GCC-x86_64-Release-Flutter_Android.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/Build-Ubuntu-GCC-x86_64-Release-Flutter_Android.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/example.expected/Build-Ubuntu-GCC-x86_64-Release-PDFium.json b/infra/bots/recipe_modules/vars/example.expected/Build-Ubuntu-GCC-x86_64-Release-PDFium.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/Build-Ubuntu-GCC-x86_64-Release-PDFium.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/example.expected/Housekeeper-Weekly-RecreateSKPs.json b/infra/bots/recipe_modules/vars/example.expected/Housekeeper-Weekly-RecreateSKPs.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/Housekeeper-Weekly-RecreateSKPs.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/example.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug.json b/infra/bots/recipe_modules/vars/example.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug.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/example.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN.json b/infra/bots/recipe_modules/vars/example.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN.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/example.expected/command_buffer.json b/infra/bots/recipe_modules/vars/example.expected/command_buffer.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/command_buffer.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/example.expected/flutter_trybot.json b/infra/bots/recipe_modules/vars/example.expected/flutter_trybot.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/flutter_trybot.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/example.expected/linux.json b/infra/bots/recipe_modules/vars/example.expected/linux.json new file mode 100644 index 0000000000..7726ecb249 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/linux.json @@ -0,0 +1,7 @@ +[ + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/vars/example.expected/pdfium_trybot.json b/infra/bots/recipe_modules/vars/example.expected/pdfium_trybot.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/pdfium_trybot.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/example.expected/test.json b/infra/bots/recipe_modules/vars/example.expected/test.json new file mode 100644 index 0000000000..7726ecb249 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/test.json @@ -0,0 +1,7 @@ +[ + { + "name": "$result", + "recipe_result": null, + "status_code": 0 + } +]
\ No newline at end of file diff --git a/infra/bots/recipe_modules/vars/example.expected/win.json b/infra/bots/recipe_modules/vars/example.expected/win.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/win.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/example.expected/win_test.json b/infra/bots/recipe_modules/vars/example.expected/win_test.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.expected/win_test.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/example.py b/infra/bots/recipe_modules/vars/example.py new file mode 100644 index 0000000000..917f85db06 --- /dev/null +++ b/infra/bots/recipe_modules/vars/example.py @@ -0,0 +1,108 @@ +# Copyright 2017 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + + +DEPS = [ + 'recipe_engine/properties', + 'vars', +] + + +def RunSteps(api): + api.vars.setup() + info = [ + api.vars.upload_dm_results, + api.vars.upload_perf_results, + api.vars.swarming_bot_id, + api.vars.swarming_task_id, + ] + assert len(info) == 4 # Make pylint happy. + + +def GenTests(api): + buildername = 'Build-Win-MSVC-x86_64-Release-Vulkan' + yield ( + api.test('win') + + api.properties(buildername=buildername, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + ) + + buildername = 'Build-Mac-Clang-x86_64-Debug-CommandBuffer' + yield ( + api.test('command_buffer') + + api.properties(buildername=buildername, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + ) + + buildername = 'Test-Win10-MSVC-ShuttleA-GPU-GTX660-x86_64-Debug' + yield ( + api.test('win_test') + + api.properties(buildername=buildername, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]', + patch_storage='gerrit') + + api.properties.tryserver( + buildername=buildername, + gerrit_project='skia', + gerrit_url='https://skia-review.googlesource.com/', + ) + ) + + builder = 'Housekeeper-Weekly-RecreateSKPs' + yield ( + api.test(builder) + + api.properties(buildername=builder, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + ) + + builder = 'Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug' + yield ( + api.test(builder) + + api.properties(buildername=builder, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + ) + + builder = 'Perf-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN' + yield ( + api.test(builder) + + api.properties(buildername=builder, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + ) + + builder = 'Build-Ubuntu-GCC-x86_64-Release-PDFium' + yield ( + api.test(builder) + + api.properties(buildername=builder, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + ) + + builder = 'Build-Ubuntu-GCC-x86_64-Release-Flutter_Android' + yield ( + api.test(builder) + + api.properties(buildername=builder, + repository='https://skia.googlesource.com/skia.git', + revision='abc123', + path_config='kitchen', + swarm_out_dir='[SWARM_OUT_DIR]') + ) |