Skip to content

Commit

Permalink
Merge commit '198220f9a7c68aa11dce96be96aaef88c36f8d35' into jinja
Browse files Browse the repository at this point in the history
  • Loading branch information
marcus-sonestedt committed Dec 19, 2009
2 parents 4fa4cfa + 198220f commit 43fd7d7
Show file tree
Hide file tree
Showing 10 changed files with 41 additions and 24 deletions.
2 changes: 2 additions & 0 deletions buildbot/changes/changes.py
Expand Up @@ -98,6 +98,8 @@ def asHTML(self):
self.revlink, self.revision)
else:
revision = "Revision: <b>%s</b><br />\n" % self.revision
else:
revision = None

branch = ""
if self.branch:
Expand Down
2 changes: 1 addition & 1 deletion buildbot/process/buildstep.py
Expand Up @@ -1114,7 +1114,7 @@ def setStatus(self, cmd, results):
self.step_status.setText(self.getText(cmd, results))
self.step_status.setText2(self.maybeGetText2(cmd, results))

# (WithProeprties used to be available in this module)
# (WithProperties used to be available in this module)
from buildbot.process.properties import WithProperties
_hush_pyflakes = [WithProperties]
del _hush_pyflakes
Expand Down
4 changes: 3 additions & 1 deletion buildbot/status/builder.py
Expand Up @@ -952,7 +952,9 @@ def stepFinished(self, results):
if logCompressionLimit is not False and \
isinstance(loog, LogFile):
if os.path.getsize(loog.getFilename()) > logCompressionLimit:
cld.append(loog.compressLog())
loog_deferred = loog.compressLog()
if loog_deferred:
cld.append(loog_deferred)

for r in self.updates.keys():
if self.updates[r] is not None:
Expand Down
6 changes: 3 additions & 3 deletions buildbot/status/web/index.html
Expand Up @@ -9,15 +9,15 @@
<h1>Welcome to the Buildbot!</h1>

<ul>
<li>the <a href="waterfall">Waterfall Display</a> will give you a
time-oriented summary of recent buildbot activity.</li>

<li>the <a href="grid">Grid Display</a> will give you a
developer-oriented summary of recent buildbot activity.</li>

<li>the <a href="tgrid">Transposed Grid Display</a> presents
the same information as the grid, but lists the revisions down the side.</li>

<li>the <a href="waterfall">Waterfall Display</a> will give you a
time-oriented summary of recent buildbot activity.</li>

<li>The <a href="one_box_per_builder">Latest Build</a> for each builder is
here.</li>

Expand Down
19 changes: 11 additions & 8 deletions buildbot/steps/master.py
Expand Up @@ -35,30 +35,33 @@ def processEnded(self, status_object):
self.step.processEnded(status_object)

def start(self):
# render properties
properties = self.build.getProperties()
command = properties.render(self.command)
# set up argv
if type(self.command) in types.StringTypes:
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 += [self.command]
argv += [command]
else:
# for posix, use /bin/sh. for other non-posix, well, doesn't
# hurt to try
argv = ['/bin/sh', '-c', self.command]
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(self.command)
argv += list(command)
else:
argv = self.command
argv = command

self.stdio_log = stdio_log = self.addLog("stdio")

if type(self.command) in types.StringTypes:
stdio_log.addHeader(self.command.strip() + "\n\n")
if type(command) in types.StringTypes:
stdio_log.addHeader(command.strip() + "\n\n")
else:
stdio_log.addHeader(" ".join(self.command) + "\n\n")
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,))
Expand Down
2 changes: 1 addition & 1 deletion buildbot/test/test_locks.py
Expand Up @@ -455,7 +455,7 @@ def _testLock2_1(self, res):
self.failUnless(self.events[:2] == [("start", 1), ("start", 2)] or
self.events[:2] == [("start", 2), ("start", 1)])

def testLock3(self):
def dont_testLock3(self): ## disabled -- test fails sporadically
# two builds run on separate slaves with master-scoped locks should
# not overlap
self.control.getBuilder("full1c").requestBuild(self.req1)
Expand Down
6 changes: 6 additions & 0 deletions buildbot/test/test_status.py
Expand Up @@ -901,6 +901,12 @@ def _check(res):


class CompressLog(unittest.TestCase):
# compression is not supported unless bz2 is installed
try:
import bz2
except:
skip = "compression not supported (no bz2 module available)"

def testCompressLogs(self):
bss = setupBuildStepStatus("test-compress")
bss.build.builder.setLogCompressionLimit(1024)
Expand Down
7 changes: 5 additions & 2 deletions buildbot/test/test_steps.py
Expand Up @@ -21,6 +21,7 @@

from buildbot.sourcestamp import SourceStamp
from buildbot.process import buildstep, base, factory
from buildbot.process.properties import Properties, WithProperties
from buildbot.buildslave import BuildSlave
from buildbot.steps import shell, source, python, master
from buildbot.status import builder
Expand Down Expand Up @@ -752,7 +753,9 @@ def testMasterShellCommand(self):
self.slavebase = "testMasterShellCommand.slave"
self.masterbase = "testMasterShellCommand.master"
sb = self.makeSlaveBuilder()
step = self.makeStep(master.MasterShellCommand, command=['echo', 'hi'])
step = self.makeStep(master.MasterShellCommand, command=['echo',
WithProperties("hi build-%(other)s.tar.gz")])
step.build.setProperty("other", "foo", "test")

# we can't invoke runStep until the reactor is started .. hence this
# little dance
Expand All @@ -764,7 +767,7 @@ def _dotest(_):
def _check(results):
self.failUnlessEqual(results, SUCCESS)
logtxt = step.getLog("stdio").getText()
self.failUnlessEqual(logtxt.strip(), "hi")
self.failUnlessEqual(logtxt.strip(), "hi build-foo.tar.gz")
d.addCallback(_check)
reactor.callLater(0, d.callback, None)
return d
Expand Down
9 changes: 5 additions & 4 deletions buildbot/test/test_vc.py
Expand Up @@ -286,7 +286,8 @@ def createBasedir(self):
# you must call this from createRepository
self.repbase = os.path.abspath(os.path.join("test_vc",
"repositories"))
_makedirsif(self.repbase)
rmdirRecursive(self.repbase)
os.makedirs(self.repbase)

def createRepository(self):
# this will only be called once per process
Expand Down Expand Up @@ -2441,7 +2442,7 @@ def createRepository(self):
yield w; w.getResult()
w = self.dovc(tmp, "add")
yield w; w.getResult()
w = self.dovc(tmp, ['commit', '-m', 'initial_import'])
w = self.dovc(tmp, ['commit', '-m', 'initial_import', '--user' ,'bbtests@localhost' ])
yield w; w.getResult()
w = self.dovc(tmp, ['push', self.rep_trunk])
# note that hg-push does not actually update the working directory
Expand All @@ -2451,7 +2452,7 @@ def createRepository(self):
self.addTrunkRev(self.extract_id(out))

self.populate_branch(tmp)
w = self.dovc(tmp, ['commit', '-m', 'commit_on_branch'])
w = self.dovc(tmp, ['commit', '-m', 'commit_on_branch', '--user' ,'bbtests@localhost' ])
yield w; w.getResult()
w = self.dovc(tmp, ['push', self.rep_branch])
yield w; w.getResult()
Expand All @@ -2474,7 +2475,7 @@ def vc_revise(self):
# force the mtime forward a little bit
future = time.time() + 2*self.version
os.utime(version_c_filename, (future, future))
w = self.dovc(tmp, ['commit', '-m', 'revised_to_%d' % self.version])
w = self.dovc(tmp, ['commit', '-m', 'revised_to_%d' % self.version, '--user' ,'bbtests@localhost' ])
yield w; w.getResult()
w = self.dovc(tmp, ['push', self.rep_trunk])
yield w; w.getResult()
Expand Down
8 changes: 4 additions & 4 deletions docs/buildbot.texinfo
Expand Up @@ -2482,7 +2482,7 @@ build, then those changes will be included in the downstream build.
See the @pxref{Triggerable Scheduler} for a more flexible dependency
mechanism that can avoid this problem.

The arguments to this scheduler are:
The keyword arguments to this scheduler are:

@table @code
@item name
Expand All @@ -2502,9 +2502,9 @@ Example:
from buildbot import scheduler
tests = scheduler.Scheduler("just-tests", None, 5*60,
["full-linux", "full-netbsd", "full-OSX"])
package = scheduler.Dependent("build-package",
tests, # upstream scheduler -- no quotes!
["make-tarball", "make-deb", "make-rpm"])
package = scheduler.Dependent(name="build-package",
upstream=tests, # <- no quotes!
builderNames=["make-tarball", "make-deb", "make-rpm"])
c['schedulers'] = [tests, package]
@end example

Expand Down

0 comments on commit 43fd7d7

Please sign in to comment.