From 3f5a47599b8815898780a536e3b195d9f7fc8f82 Mon Sep 17 00:00:00 2001 From: borenet Date: Thu, 4 Aug 2016 12:16:03 -0700 Subject: [recipes] Fixes for Coverage bot BUG=skia:5578 GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2217523002 Review-Url: https://codereview.chromium.org/2217523002 --- infra/bots/recipe_modules/flavor/coverage_flavor.py | 21 ++++++++++++++++----- infra/bots/recipe_modules/vars/api.py | 7 +------ infra/bots/recipes/swarm_compile.py | 2 +- ...u-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot.json | 8 ++++---- 4 files changed, 22 insertions(+), 16 deletions(-) (limited to 'infra/bots') diff --git a/infra/bots/recipe_modules/flavor/coverage_flavor.py b/infra/bots/recipe_modules/flavor/coverage_flavor.py index a3bb5828ce..732da7fdd6 100644 --- a/infra/bots/recipe_modules/flavor/coverage_flavor.py +++ b/infra/bots/recipe_modules/flavor/coverage_flavor.py @@ -18,10 +18,21 @@ class CoverageFlavorUtils(default_flavor.DefaultFlavorUtils): compile_target = 'dm' build_cmd = [self.m.vars.skia_dir.join('tools', 'llvm_coverage_build'), compile_target] - self.m.run(self.m.step, - 'build %s' % compile_target, - cmd=build_cmd, - cwd=self.m.path['checkout']) + build_env = kwargs.pop('env', {}) + # We have to use Clang 3.6 because earlier versions do not support the + # compile flags we use and 3.7 and 3.8 hit asserts during compilation. + build_env['CC'] = '/usr/bin/clang-3.6' + build_env['CXX'] = '/usr/bin/clang++-3.6' + build_env['GYP_DEFINES'] = ( + 'skia_arch_type=x86_64 ' + 'skia_clang_build=1 ' + 'skia_gpu=0 ' + 'skia_warnings_as_errors=0') + self.m.step('build %s' % compile_target, + cmd=build_cmd, + cwd=self.m.path['checkout'], + env=build_env, + **kwargs) # Slice out the 'key' and 'properties' arguments to be reused. key = [] @@ -48,7 +59,7 @@ class CoverageFlavorUtils(default_flavor.DefaultFlavorUtils): self.m.vars.skia_dir.join('tools', 'llvm_coverage_run.py'), ] + cmd + ['--outResultsFile', report_file] self.m.run(self.m.step, name=name, cmd=args, - cwd=self.m.path['checkout'], **kwargs) + cwd=self.m.path['checkout'], **kwargs) # Generate nanobench-style JSON output from the coverage report. nanobench_json = results_dir.join('nanobench_%s.json' % ( diff --git a/infra/bots/recipe_modules/vars/api.py b/infra/bots/recipe_modules/vars/api.py index 897a85a7fc..092c3e62b7 100644 --- a/infra/bots/recipe_modules/vars/api.py +++ b/infra/bots/recipe_modules/vars/api.py @@ -151,12 +151,7 @@ def get_gyp_defines(builder_dict): def get_extra_env_vars(builder_dict): env = {} - if builder_dict.get('configuration') == 'Coverage': - # We have to use Clang 3.6 because earlier versions do not support the - # compile flags we use and 3.7 and 3.8 hit asserts during compilation. - env['CC'] = '/usr/bin/clang-3.6' - env['CXX'] = '/usr/bin/clang++-3.6' - elif builder_dict.get('compiler') == 'Clang': + if builder_dict.get('compiler') == 'Clang': env['CC'] = '/usr/bin/clang' env['CXX'] = '/usr/bin/clang++' diff --git a/infra/bots/recipes/swarm_compile.py b/infra/bots/recipes/swarm_compile.py index 7b7047f02e..09fb1f62bc 100644 --- a/infra/bots/recipes/swarm_compile.py +++ b/infra/bots/recipes/swarm_compile.py @@ -26,12 +26,12 @@ TEST_BUILDERS = { 'Build-Mac-Clang-Arm7-Release-iOS', 'Build-Mac-Clang-x86_64-Debug-CommandBuffer', 'Build-Mac-Clang-x86_64-Release-CMake', + 'Build-Ubuntu-Clang-x86_64-Debug-GN', 'Build-Ubuntu-GCC-Arm7-Debug-Android-Trybot', 'Build-Ubuntu-GCC-Arm7-Release-Android', 'Build-Ubuntu-GCC-Arm7-Release-Android_Vulkan', 'Build-Ubuntu-GCC-x86-Debug', 'Build-Ubuntu-GCC-x86_64-Debug-MSAN', - 'Build-Ubuntu-Clang-x86_64-Debug-GN', 'Build-Ubuntu-GCC-x86_64-Debug-GN', 'Build-Ubuntu-GCC-x86_64-Release-CMake', 'Build-Ubuntu-GCC-x86_64-Release-PDFium', diff --git a/infra/bots/recipes/swarm_test.expected/Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot.json b/infra/bots/recipes/swarm_test.expected/Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot.json index 1878e7d15b..a2ec57b3aa 100644 --- a/infra/bots/recipes/swarm_test.expected/Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot.json +++ b/infra/bots/recipes/swarm_test.expected/Test-Ubuntu-Clang-GCE-CPU-AVX2-x86_64-Coverage-Trybot.json @@ -348,9 +348,9 @@ "cwd": "[SLAVE_BUILD]/skia", "env": { "BUILDTYPE": "Coverage", - "CC": "/usr/bin/clang-3.6", + "CC": "/usr/bin/clang", "CHROME_HEADLESS": "1", - "CXX": "/usr/bin/clang++-3.6", + "CXX": "/usr/bin/clang++", "GYP_DEFINES": "skia_arch_type=x86_64 skia_clang_build=1 skia_gpu=0 skia_warnings_as_errors=0", "SKIA_OUT": "[SLAVE_BUILD]/out" }, @@ -398,9 +398,9 @@ "cwd": "[SLAVE_BUILD]/skia", "env": { "BUILDTYPE": "Coverage", - "CC": "/usr/bin/clang-3.6", + "CC": "/usr/bin/clang", "CHROME_HEADLESS": "1", - "CXX": "/usr/bin/clang++-3.6", + "CXX": "/usr/bin/clang++", "GYP_DEFINES": "skia_arch_type=x86_64 skia_clang_build=1 skia_gpu=0 skia_warnings_as_errors=0", "SKIA_OUT": "[SLAVE_BUILD]/out" }, -- cgit v1.2.3