Package buildbot :: Package process :: Module buildstep :: Class LoggingBuildStep
[frames] | no frames]

Class LoggingBuildStep

source code

BuildStep --+
            |
           LoggingBuildStep
Known Subclasses:

This is an abstract base class, suitable for inheritance by all BuildSteps that invoke RemoteCommands which emit stdout/stderr messages.

Instance Methods
 
__init__(self, logfiles={}, lazylogfiles=False, log_eval_func=None, *args, **kwargs) source code
 
addLogFile(self, logname, filename)
This allows to add logfiles after construction, but before calling startCommand().
source code
 
startCommand(self, cmd, errorMessages=[]) source code
 
setupLogfiles(self, cmd, logfiles)
Set up any additional logfiles= logs.
source code
 
interrupt(self, reason)
Halt the command, either because the user has decided to cancel the build ('reason' is a string), or because the slave has disconnected ('reason' is a ConnectionLost Failure).
source code
 
checkDisconnect(self, f) source code
 
commandComplete(self, cmd)
This is a general-purpose hook method for subclasses.
source code
 
createSummary(self, log)
To create summary logs, do something like this: warnings = grep('^Warning:', log.getText()) self.addCompleteLog('warnings', warnings)
source code
 
evaluateCommand(self, cmd)
Decide whether the command was SUCCESS, WARNINGS, or FAILURE.
source code
 
getText(self, cmd, results) source code
 
getText2(self, cmd, results)
We have decided to add a short note about ourselves to the overall build description, probably because something went wrong.
source code
 
maybeGetText2(self, cmd, results) source code
 
setStatus(self, cmd, results) source code

Inherited from BuildStep: acquireLocks, addCompleteLog, addFactoryArguments, addHTMLLog, addLog, addLogObserver, addURL, describe, failed, finished, getLog, getProperty, getSlaveName, getStepFactory, releaseLocks, runCommand, setBuild, setBuildSlave, setDefaultWorkdir, setProgress, setProperty, setStepStatus, setupProgress, slaveVersion, slaveVersionIsOlderThan, start, startStep

Class Variables
  progressMetrics = ('output')
  logfiles = {}
  parms = ['name', 'locks', 'haltOnFailure', 'flunkOnWarnings', ...
  cmd = None
hash(x)

Inherited from BuildStep: alwaysRun, doStepIf, flunkOnFailure, flunkOnWarnings, haltOnFailure, locks, name, useProgress, warnOnFailure, warnOnWarnings

Instance Variables

Inherited from BuildStep: build, progress, step_status

Method Details

__init__(self, logfiles={}, lazylogfiles=False, log_eval_func=None, *args, **kwargs)
(Constructor)

source code 
Overrides: BuildStep.__init__

startCommand(self, cmd, errorMessages=[])

source code 
Parameters:
  • cmd - a suitable RemoteCommand which will be launched, with all output being put into our self.stdio_log LogFile

setupLogfiles(self, cmd, logfiles)

source code 

Set up any additional logfiles= logs.

Parameters:
  • cmd - the LoggedRemoteCommand to add additional logs to.
  • logfiles - a dict of tuples (logname,remotefilename) specifying additional logs to watch. (note: the remotefilename component is currently ignored)

interrupt(self, reason)

source code 

Halt the command, either because the user has decided to cancel the build ('reason' is a string), or because the slave has disconnected ('reason' is a ConnectionLost Failure). Any further local processing should be skipped, and the Step completed with an error status. The results text should say something useful like ['step', 'interrupted'] or ['remote', 'lost']

Overrides: BuildStep.interrupt
(inherited documentation)

commandComplete(self, cmd)

source code 

This is a general-purpose hook method for subclasses. It will be called after the remote command has finished, but before any of the other hook functions are called.

evaluateCommand(self, cmd)

source code 

Decide whether the command was SUCCESS, WARNINGS, or FAILURE. Override this to, say, declare WARNINGS if there is any stderr activity, or to say that rc!=0 is not actually an error.

getText2(self, cmd, results)

source code 

We have decided to add a short note about ourselves to the overall build description, probably because something went wrong. Return a short list of short strings. If your subclass counts test failures or warnings of some sort, this is a good place to announce the count.


Class Variable Details

parms

Value:
['name',
 'locks',
 'haltOnFailure',
 'flunkOnWarnings',
 'flunkOnFailure',
 'warnOnWarnings',
 'warnOnFailure',
 'alwaysRun',
...