diff options
author | borenet <borenet@chromium.org> | 2016-08-04 12:16:03 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-08-04 12:16:03 -0700 |
commit | 3f5a47599b8815898780a536e3b195d9f7fc8f82 (patch) | |
tree | f2a6631f737e2775bf5780414832b19c509f1f4a /infra/bots/recipe_modules | |
parent | c7233ef925157d0c881a1caebe7836e3823c88d5 (diff) |
[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
Diffstat (limited to 'infra/bots/recipe_modules')
-rw-r--r-- | infra/bots/recipe_modules/flavor/coverage_flavor.py | 21 | ||||
-rw-r--r-- | infra/bots/recipe_modules/vars/api.py | 7 |
2 files changed, 17 insertions, 11 deletions
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++' |