summaryrefslogtreecommitdiff
path: root/cbuildbot/stages/chrome_stages.py
diff options
context:
space:
mode:
authorPrathmesh Prabhu <pprabhu@chromium.org>2015-07-17 11:40:40 -0700
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2015-07-18 01:05:24 +0000
commit17f0742270498c9ce88af2e61027caca0307ee78 (patch)
tree98ce84f441c1b33d2ce9973f11df8abaf96e887a /cbuildbot/stages/chrome_stages.py
parent6c8a2c9b5298fc506378272930aac6855d199f26 (diff)
downloadchromite-17f0742270498c9ce88af2e61027caca0307ee78.tar.gz
logging: Add knob to suppress PrintBuildbot* logging functions.
This CL adds a knob to modify the behavior of PrintBuildbot* functions. By default, these functions now dump logs in a way that buidbot does not recognize them as special log lines. When the knob is turned on, the buildbot recognizable special log lines are dumped. It also moves these functions to the cros_logging module, because they belong better to the logging module. Finally, by default, the cbuildbot entry point turns on this knob. BUG=chromium:510905 TEST=(1) unittests. (2) Trybot the hell out of this. Change-Id: I739dcbf13a60e20f68a1a692dba0c621ec297524 Reviewed-on: https://chromium-review.googlesource.com/286532 Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org> Commit-Queue: Prathmesh Prabhu <pprabhu@chromium.org> Tested-by: Prathmesh Prabhu <pprabhu@chromium.org>
Diffstat (limited to 'cbuildbot/stages/chrome_stages.py')
-rw-r--r--cbuildbot/stages/chrome_stages.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/cbuildbot/stages/chrome_stages.py b/cbuildbot/stages/chrome_stages.py
index 19ede780e..43356b343 100644
--- a/cbuildbot/stages/chrome_stages.py
+++ b/cbuildbot/stages/chrome_stages.py
@@ -75,13 +75,13 @@ class SyncChromeStage(generic_stages.BuilderStage,
kwargs = {}
if self._chrome_rev == constants.CHROME_REV_SPEC:
kwargs['revision'] = self.chrome_version
- cros_build_lib.PrintBuildbotStepText('revision %s' % kwargs['revision'])
+ logging.PrintBuildbotStepText('revision %s' % kwargs['revision'])
else:
if not self.chrome_version:
self.chrome_version = self._run.DetermineChromeVersion()
kwargs['tag'] = self.chrome_version
- cros_build_lib.PrintBuildbotStepText('tag %s' % kwargs['tag'])
+ logging.PrintBuildbotStepText('tag %s' % kwargs['tag'])
useflags = self._run.config.useflags
commands.SyncChrome(self._build_root, self._run.options.chrome_root,
@@ -121,7 +121,7 @@ class PatchChromeStage(generic_stages.BuilderStage):
if not colon:
subdir = 'src'
url = self.URL_BASE % {'id': patch}
- cros_build_lib.PrintBuildbotLink(spatch, url)
+ logging.PrintBuildbotLink(spatch, url)
commands.PatchChrome(self._run.options.chrome_root, patch, subdir)
@@ -163,7 +163,7 @@ class ChromeSDKStage(generic_stages.BoardSpecificBuilderStage,
raise artifact_stages.NothingToArchiveException(
'Failed to find package %s' % constants.CHROME_CP)
if len(files) > 1:
- cros_build_lib.PrintBuildbotStepWarnings()
+ logging.PrintBuildbotStepWarnings()
logging.warning('Expected one package for %s, found %d',
constants.CHROME_CP, len(files))
@@ -221,7 +221,7 @@ class ChromeSDKStage(generic_stages.BoardSpecificBuilderStage,
# Chrome no longer builds on Lucid. See crbug.com/276311
print('Ubuntu lucid is no longer supported.')
print('Please upgrade to Ubuntu Precise.')
- cros_build_lib.PrintBuildbotStepWarnings()
+ logging.PrintBuildbotStepWarnings()
return
steps = [self._BuildAndArchiveChromeSysroot, self._ArchiveChromeEbuildEnv,