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

Unified Diff: scripts/master/chromium_step.py

Issue 70653003: Add DEPS roll support to got_XXX_revision. (Closed) Base URL: https://chromium.googlesource.com/a/chromium/tools/build.git@master
Patch Set: Created 7 years, 1 month 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 | « no previous file | scripts/slave/chromium_commands.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scripts/master/chromium_step.py
diff --git a/scripts/master/chromium_step.py b/scripts/master/chromium_step.py
index be4337edee8d6cd31e386565c3305e0d724799aa..2c51929127c13c87f12d9a2b91a29dbeb53f4647 100644
--- a/scripts/master/chromium_step.py
+++ b/scripts/master/chromium_step.py
@@ -26,6 +26,16 @@ from common import chromium_utils
import config
+GOT_REVISION_PROPERTIES = (
+ ('got_nacl_revision', 'got_nacl_revision'),
+ ('got_swarm_client_revision', 'got_swarm_client_revision'),
+ ('got_swarming_client_revision', 'got_swarming_client_revision'),
+ ('got_v8_revision', 'got_v8_revision'),
+ ('got_webkit_revision', 'got_webkit_revision'),
+ ('got_webrtc_revision', 'got_webrtc_revision'),
+)
+
+
def change_to_revision(c):
"""Handle revision == None or any invalid value."""
try:
@@ -267,13 +277,7 @@ class GClient(source.Source):
primary_revision_key = 'got_' + primary_repo + 'revision'
properties = (
('got_revision', primary_revision_key),
- ('got_nacl_revision', 'got_nacl_revision'),
- ('got_swarm_client_revision', 'got_swarm_client_revision'),
- ('got_swarming_client_revision', 'got_swarming_client_revision'),
- ('got_v8_revision', 'got_v8_revision'),
- ('got_webkit_revision', 'got_webkit_revision'),
- ('got_webrtc_revision', 'got_webrtc_revision'),
- )
+ ) + GOT_REVISION_PROPERTIES
for prop_name, cmd_arg in properties:
if cmd_arg in cmd.updates:
got_revision = cmd.updates[cmd_arg][-1]
@@ -303,6 +307,19 @@ class ApplyIssue(LoggingBuildStep):
cmd = buildstep.LoggedRemoteCommand('apply_issue', args)
self.startCommand(cmd)
+ def commandComplete(self, cmd):
ghost stip (do not use) 2013/11/14 22:25:40 nope
+ """Handles status updates from buildbot slave when the step is done.
+
+ Update the relevant got_XX_revision build properties if available. This only
+ happens if the DEPS file was modified.
+ """
+ LoggingBuildStep.commandComplete(self, cmd)
+ for prop_name, cmd_arg in GOT_REVISION_PROPERTIES:
+ if cmd_arg in cmd.updates:
+ got_revision = cmd.updates[cmd_arg][-1]
+ if got_revision:
+ self.setProperty(prop_name, str(got_revision), 'Source')
+
class BuilderStatus(object):
# Order in asceding severity.
« no previous file with comments | « no previous file | scripts/slave/chromium_commands.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698