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

Unified Diff: master/skia_master_scripts/factory.py

Issue 13861012: Change builder names (Closed) Base URL: http://skia.googlecode.com/svn/buildbot/
Patch Set: Created 7 years, 8 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 | « master/master_private_builders_cfg.py ('k') | master/skia_master_scripts/utils.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: master/skia_master_scripts/factory.py
===================================================================
--- master/skia_master_scripts/factory.py (revision 8794)
+++ master/skia_master_scripts/factory.py (working copy)
@@ -17,6 +17,7 @@
import config_private
import ntpath
import posixpath
+import utils
# TODO(epoger): My intent is to make the build steps identical on all platforms
@@ -30,7 +31,6 @@
CONFIG_DEBUG = 'Debug'
CONFIG_RELEASE = 'Release'
-CONFIG_BENCH = 'Bench'
CONFIGURATIONS = [CONFIG_DEBUG, CONFIG_RELEASE]
@@ -117,8 +117,12 @@
else:
my_env_vars = dict(environment_variables)
gyp_defines = my_env_vars.get('GYP_DEFINES', '')
- my_env_vars['GYP_DEFINES'] = gyp_defines + \
- ' skia_warnings_as_errors=%d' % int(compile_warnings_as_errors)
+ if gyp_defines:
+ my_env_vars['GYP_DEFINES'] = gyp_defines + \
+ ' skia_warnings_as_errors=%d' % int(compile_warnings_as_errors)
+ else:
+ my_env_vars['GYP_DEFINES'] = \
+ 'skia_warnings_as_errors=%d' % int(compile_warnings_as_errors)
# Get an implementation of SkiaCommands as appropriate for
# this target_platform.
@@ -489,50 +493,37 @@
self.UploadBenchResultsToAppEngine()
self.UploadBenchGraphs()
- def Build(self, clobber=None):
+ def Build(self, role=None, clobber=None):
"""Build and return the complete BuildFactory.
+ role: string; the intended role of this builder. The role affects which
+ steps are run. Known values are given in the utils module.
clobber: boolean indicating whether we should clean before building
"""
- self.CommonSteps(clobber)
- self.NonPerfSteps()
- self.PerfSteps()
+ if not role:
+ # If no role is provide, just run everything.
+ self.CommonSteps(clobber)
+ self.NonPerfSteps()
+ self.PerfSteps()
+ elif role == utils.BUILDER_ROLE_COMPILE:
+ # Compile-only builder.
+ self.UpdateSteps()
+ self.Compile(clobber=clobber, build_in_one_step=False)
+ else:
+ self.CommonSteps(clobber)
+ if role == utils.BUILDER_ROLE_TEST:
+ # Test-running builder.
+ self.NonPerfSteps()
+ if self._configuration == CONFIG_DEBUG:
+ # Debug-mode testers run all steps, but release-mode testers don't.
+ self.PerfSteps()
+ elif role == utils.BUILDER_ROLE_PERF:
+ # Perf-only builder.
+ if not self._perf_output_basedir:
+ raise ValueError(
+ 'BuildPerfOnly requires perf_output_basedir to be defined.')
+ if self._configuration != CONFIG_RELEASE:
+ raise ValueError('BuildPerfOnly should run in %s configuration.' %
+ CONFIG_RELEASE)
+ self.PerfSteps()
return self
-
- def BuildCompileOnly(self, clobber=None):
- """Build and return the complete BuildFactory, with only the compile step.
- Does not build in one step; the assumption is that if we're only performing
- the compile, we want as much information as possible about *which* compile
- steps are passing and failing.
-
- clobber: boolean indicating whether we should clean before building
- """
- self.UpdateSteps()
- self.Compile(clobber=clobber, build_in_one_step=False)
- return self
-
- def BuildNoPerf(self, clobber=None):
- """Build and return the complete BuildFactory, without the benchmarking
- steps.
-
- clobber: boolean indicating whether we should clean before building
- """
- self.CommonSteps(clobber)
- self.NonPerfSteps()
- return self
-
- def BuildPerfOnly(self, clobber=None):
- """Build and return the complete BuildFactory, with only the benchmarking
- steps.
-
- clobber: boolean indicating whether we should clean before building
- """
- if not self._perf_output_basedir:
- raise ValueError(
- 'BuildPerfOnly requires perf_output_basedir to be defined.')
- if self._configuration != CONFIG_RELEASE:
- raise ValueError('BuildPerfOnly should run in %s configuration.' %
- CONFIG_RELEASE)
- self.CommonSteps(clobber)
- self.PerfSteps()
- return self
« no previous file with comments | « master/master_private_builders_cfg.py ('k') | master/skia_master_scripts/utils.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698