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

Unified Diff: third_party/buildbot_7_12/buildbot/steps/master.py

Issue 12207158: Bye bye buildbot 0.7.12. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/tools/build
Patch Set: Created 7 years, 10 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 | « third_party/buildbot_7_12/buildbot/steps/dummy.py ('k') | third_party/buildbot_7_12/buildbot/steps/maxq.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/buildbot_7_12/buildbot/steps/master.py
diff --git a/third_party/buildbot_7_12/buildbot/steps/master.py b/third_party/buildbot_7_12/buildbot/steps/master.py
deleted file mode 100644
index 34e8df765b6d430523f286b1898b495be3ef0cd1..0000000000000000000000000000000000000000
--- a/third_party/buildbot_7_12/buildbot/steps/master.py
+++ /dev/null
@@ -1,79 +0,0 @@
-import os, types
-from twisted.python import log, failure, runtime
-from twisted.internet import reactor, defer, task
-from buildbot.process.buildstep import RemoteCommand, BuildStep
-from buildbot.process.buildstep import SUCCESS, FAILURE
-from twisted.internet.protocol import ProcessProtocol
-
-class MasterShellCommand(BuildStep):
- """
- Run a shell command locally - on the buildmaster. The shell command
- COMMAND is specified just as for a RemoteShellCommand. Note that extra
- logfiles are not sopported.
- """
- name='MasterShellCommand'
- description='Running'
- descriptionDone='Ran'
-
- def __init__(self, command, **kwargs):
- BuildStep.__init__(self, **kwargs)
- self.addFactoryArguments(command=command)
- self.command=command
-
- class LocalPP(ProcessProtocol):
- def __init__(self, step):
- self.step = step
-
- def outReceived(self, data):
- self.step.stdio_log.addStdout(data)
-
- def errReceived(self, data):
- self.step.stdio_log.addStderr(data)
-
- def processEnded(self, status_object):
- self.step.stdio_log.addHeader("exit status %d\n" % status_object.value.exitCode)
- self.step.processEnded(status_object)
-
- def start(self):
- # render properties
- properties = self.build.getProperties()
- command = properties.render(self.command)
- # set up argv
- if type(command) in types.StringTypes:
- if runtime.platformType == 'win32':
- argv = os.environ['COMSPEC'].split() # allow %COMSPEC% to have args
- if '/c' not in argv: argv += ['/c']
- argv += [command]
- else:
- # for posix, use /bin/sh. for other non-posix, well, doesn't
- # hurt to try
- argv = ['/bin/sh', '-c', command]
- else:
- if runtime.platformType == 'win32':
- argv = os.environ['COMSPEC'].split() # allow %COMSPEC% to have args
- if '/c' not in argv: argv += ['/c']
- argv += list(command)
- else:
- argv = command
-
- self.stdio_log = stdio_log = self.addLog("stdio")
-
- if type(command) in types.StringTypes:
- stdio_log.addHeader(command.strip() + "\n\n")
- else:
- stdio_log.addHeader(" ".join(command) + "\n\n")
- stdio_log.addHeader("** RUNNING ON BUILDMASTER **\n")
- stdio_log.addHeader(" in dir %s\n" % os.getcwd())
- stdio_log.addHeader(" argv: %s\n" % (argv,))
-
- # TODO add a timeout?
- proc = reactor.spawnProcess(self.LocalPP(self), argv[0], argv)
- # (the LocalPP object will call processEnded for us)
-
- def processEnded(self, status_object):
- if status_object.value.exitCode != 0:
- self.step_status.setText(["failed (%d)" % status_object.value.exitCode])
- self.finished(FAILURE)
- else:
- self.step_status.setText(["succeeded"])
- self.finished(SUCCESS)
« no previous file with comments | « third_party/buildbot_7_12/buildbot/steps/dummy.py ('k') | third_party/buildbot_7_12/buildbot/steps/maxq.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698