Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(185)

Unified Diff: infra/bots/recipe_modules/flavor/coverage_flavor.py

Issue 2353483003: Delete unused coverage recipe code. (Closed)
Patch Set: tools/ too Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « infra/bots/recipe_modules/flavor/api.py ('k') | infra/bots/recipes/swarm_test.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: infra/bots/recipe_modules/flavor/coverage_flavor.py
diff --git a/infra/bots/recipe_modules/flavor/coverage_flavor.py b/infra/bots/recipe_modules/flavor/coverage_flavor.py
deleted file mode 100644
index 732da7fdd66d5420d9796f8c1a468e8f78cd8afb..0000000000000000000000000000000000000000
--- a/infra/bots/recipe_modules/flavor/coverage_flavor.py
+++ /dev/null
@@ -1,86 +0,0 @@
-# Copyright 2014 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.
-
-
-import datetime
-import default_flavor
-import posixpath
-
-
-"""Utils for running coverage tests."""
-
-
-class CoverageFlavorUtils(default_flavor.DefaultFlavorUtils):
-
- def step(self, name, cmd, **kwargs):
- """Run the given step through coverage."""
- compile_target = 'dm'
- build_cmd = [self.m.vars.skia_dir.join('tools', 'llvm_coverage_build'),
- compile_target]
- 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 = []
- properties = []
- current = None
- for i in xrange(0, len(cmd)):
- if isinstance(cmd[i], basestring) and cmd[i] == '--key':
- current = key
- elif isinstance(cmd[i], basestring) and cmd[i] == '--properties':
- current = properties
- elif isinstance(cmd[i], basestring) and cmd[i].startswith('--'):
- current = None
- if current is not None:
- current.append(cmd[i])
-
- results_dir = self.m.vars.skia_out.join('coverage_results')
- self.create_clean_host_dir(results_dir)
-
- # Run DM under coverage.
- report_file_basename = '%s.cov' % self.m.vars.got_revision
- report_file = results_dir.join(report_file_basename)
- args = [
- 'python',
- 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)
-
- # Generate nanobench-style JSON output from the coverage report.
- nanobench_json = results_dir.join('nanobench_%s.json' % (
- self.m.vars.got_revision))
- line_by_line_basename = ('coverage_by_line_%s.json' % (
- self.m.vars.got_revision))
- line_by_line = results_dir.join(line_by_line_basename)
- args = [
- 'python',
- self.m.vars.skia_dir.join('tools', 'parse_llvm_coverage.py'),
- '--report', report_file, '--nanobench', nanobench_json,
- '--linebyline', line_by_line]
- args.extend(key)
- args.extend(properties)
- self.m.run(
- self.m.step,
- 'Generate Coverage Data',
- cmd=args, cwd=self.m.path['checkout'])
-
- # Copy files from results_dir into swarming_out_dir.
- for r in self.m.file.listdir('results_dir', results_dir):
- self.m.file.copy(
- 'Copy to swarming out', results_dir.join(r),
- self.m.vars.swarming_out_dir)
« no previous file with comments | « infra/bots/recipe_modules/flavor/api.py ('k') | infra/bots/recipes/swarm_test.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698