Changes

Jump to: navigation, search

Mozilla BuildBot Trending/Patches

2,212 bytes added, 12:31, 7 February 2009
no edit summary
</pre>
 
==New Timestamps Patch==
 
This patch, applied to the previous patch changes the behaviour of the timestamps. Instead of having all information on ever line it only puts a timestamp on each line. Information that is constant throughout the run are only inserted once
 
 
<pre>diff -r 9a6c6b742a5a buildbot/buildbot/status/builder.py
--- a/buildbot/buildbot/status/builder.py Sat Feb 07 12:22:37 2009 -0500
+++ b/buildbot/buildbot/status/builder.py Sat Feb 07 12:27:49 2009 -0500
@@ -6,6 +6,8 @@
from twisted.internet import reactor, defer
from twisted.protocols import basic
from buildbot.process.properties import Properties
+# JOHNFORD
+from time import time
import os, shutil, sys, re, urllib, itertools
from cPickle import load, dump
@@ -232,6 +234,12 @@
self.runEntries = []
self.watchers = []
self.finishedWatchers = []
+ # Add some information about the build to the log
+ self.addEntry(STDOUT, repr(time()) + ' | '
+ + repr(self.getStep().build.slavename) + ' | '
+ + self.getStep().build.getBuilder().getName() + ' | '
+ + repr(self.getStep().build.getNumber()))# + ' | '
+ #+ repr(getFilename()))
def getFilename(self):
return os.path.join(self.step.build.builder.basedir, self.filename)
@@ -391,11 +399,11 @@
for w in self.watchers:
w.logChunk(self.step.build, self.step, self, channel, text)
self.length += len(text)
-
+
def addStdout(self, text):
- self.addEntry(STDOUT, repr(time()) + ' | ' + repr(self.getStep().build.slavename) + ' | ' + self.getStep().build.getBuilder().getName() + ' | ' + repr(self.getStep().build.getNumber()) + ' | ' + text + '\n')
+ self.addEntry(STDOUT, repr(time()) + ' | ' + text)
def addStderr(self, text):
- self.addEntry(STDERR, repr(time()) + ' | ' + repr(self.getStep().build.slavename) + ' | ' + self.getStep().build.getBuilder().getName() + ' | ' + repr(self.getStep().build.getNumber()) + ' | ' + text + '\n')
+ self.addEntry(STDERR, repr(time()) + ' | ' + text)
def addHeader(self, text):
self.addEntry(HEADER, text)</pre>
1
edit

Navigation menu