From c795a4c8862dbab914561fadf7a3567c55362ae4 Mon Sep 17 00:00:00 2001 From: Kevin Lubick Date: Mon, 9 Oct 2017 15:26:19 -0400 Subject: 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 Reviewed-by: Eric Boren --- infra/bots/recipe_modules/vars/api.py | 23 +++++++++----- ...E-CPU-AVX2-x86_64-Release-CT_BENCH_1k_SKPs.json | 35 ++++++++++++++++++++++ ...9-Clang-GCE-CPU-AVX2-x86_64-Debug-Coverage.json | 35 ++++++++++++++++++++++ infra/bots/recipe_modules/vars/examples/full.py | 2 ++ 4 files changed, 87 insertions(+), 8 deletions(-) create mode 100644 infra/bots/recipe_modules/vars/examples/full.expected/Perf-Ubuntu14-GCC-GCE-CPU-AVX2-x86_64-Release-CT_BENCH_1k_SKPs.json create mode 100644 infra/bots/recipe_modules/vars/examples/full.expected/Upload-Debian9-Clang-GCE-CPU-AVX2-x86_64-Debug-Coverage.json (limited to 'infra/bots/recipe_modules/vars') 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', ] -- cgit v1.2.3