diff options
author | Kevin Lubick <kjlubick@google.com> | 2017-10-09 15:26:19 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-10-09 19:58:34 +0000 |
commit | c795a4c8862dbab914561fadf7a3567c55362ae4 (patch) | |
tree | 725e0fc4209029005230fdd4db48035d3aebd52a /infra/bots/recipe_modules/vars | |
parent | df007e1a7ae808ad41eb2bd01f6a658c5b438285 (diff) |
Add Linux CPU Coverage Bot
This simply uploads the results of an LLVM coverage to GCS
for later ingestion/display.
Bug: skia:7080
Change-Id: I7dcfa2307a239734a614990aca899ea37129126b
Reviewed-on: https://skia-review.googlesource.com/53880
Commit-Queue: Kevin Lubick <kjlubick@google.com>
Reviewed-by: Eric Boren <borenet@google.com>
Diffstat (limited to 'infra/bots/recipe_modules/vars')
4 files changed, 87 insertions, 8 deletions
diff --git a/infra/bots/recipe_modules/vars/api.py b/infra/bots/recipe_modules/vars/api.py index 1102b6955a..eff8f21693 100644 --- a/infra/bots/recipe_modules/vars/api.py +++ b/infra/bots/recipe_modules/vars/api.py @@ -37,15 +37,22 @@ class SkiaVarsApi(recipe_api.RecipeApi): self.gclient_env = {} self.is_compile_bot = self.builder_name.startswith('Build-') + self.persistent_checkout = False # Compile bots keep a persistent checkout. - self.persistent_checkout = (self.is_compile_bot or - 'RecreateSKPs' in self.builder_name or - 'UpdateMetaConfig' in self.builder_name or - '-CT_' in self.builder_name or - 'Presubmit' in self.builder_name or - 'InfraTests' in self.builder_name or - self.builder_name == "Housekeeper-PerCommit" or - 'CheckGeneratedFiles' in self.builder_name) + if self.is_compile_bot: + self.persistent_checkout = True + if 'Housekeeper' in self.builder_name: + self.persistent_checkout = True + if '-CT_' in self.builder_name: + self.persistent_checkout = True + # We need the source code for the Coverage's Upload step to be in the + # same absolute location as when we compiled it so we can map the + # coverage data to actual line numbers. We ensure this by making sure + # we have a checkout on the Coverage's Upload step and that the Upload + # step runs on the same bots that Compile. + if 'Coverage' in self.builder_name and 'Upload' in self.builder_name: + self.persistent_checkout = True + if self.persistent_checkout: if 'Win' in self.builder_name: self.checkout_root = self.make_path('C:\\', 'b', 'work') diff --git a/infra/bots/recipe_modules/vars/examples/full.expected/Perf-Ubuntu14-GCC-GCE-CPU-AVX2-x86_64-Release-CT_BENCH_1k_SKPs.json b/infra/bots/recipe_modules/vars/examples/full.expected/Perf-Ubuntu14-GCC-GCE-CPU-AVX2-x86_64-Release-CT_BENCH_1k_SKPs.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/examples/full.expected/Perf-Ubuntu14-GCC-GCE-CPU-AVX2-x86_64-Release-CT_BENCH_1k_SKPs.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.expected/Upload-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-Coverage.json b/infra/bots/recipe_modules/vars/examples/full.expected/Upload-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-Coverage.json new file mode 100644 index 0000000000..4594f9e6b9 --- /dev/null +++ b/infra/bots/recipe_modules/vars/examples/full.expected/Upload-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-Coverage.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 0f38909cd7..e875a2353d 100644 --- a/infra/bots/recipe_modules/vars/examples/full.py +++ b/infra/bots/recipe_modules/vars/examples/full.py @@ -29,6 +29,8 @@ TEST_BUILDERS = [ 'Housekeeper-Weekly-RecreateSKPs', 'Perf-Chromecast-GCC-Chorizo-CPU-Cortex_A7-arm-Debug', 'Perf-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-ASAN', + 'Perf-Ubuntu14-GCC-GCE-CPU-AVX2-x86_64-Release-CT_BENCH_1k_SKPs', + 'Upload-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-Coverage', ] |