[Buildbot-devel] Problems to add svnpoller source

Niklaus Giger niklaus.giger at member.fsf.org
Sat May 20 15:22:48 UTC 2006


Hi

I run into several problems while trying to add a new svnpoller.
My initial patch is attached.

I have the following problems:
- Shall I support branches? And then how? Must a add a "defaultBranch" 
argument to the SVNSource?

- Running the testcase  buildbot.test.test_changes.SVNPoller.testSvnRepo
(see attached test.log) SVNPoller _startPolling starts after the teardown. 
What is my error in the testcase? (This testcase needs a hand made subversion 
repository in /tmp/svn_repo. The steps are outline in test_change.py 
(makeSimpleSvnRepo)).

- With the attached master.cfg I am able to read http://localhost:8010/. But 
if a read it again after the svnpoller got called once I get the following 
error message (but nothing useable in the twisted.log).
 Request did not return a string
Request: 
<GET / HTTP/1.1>

Resource: 
<buildbot.status.html.WaterfallStatusResource instance at 0x30713530>

Value: 
u'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 
Transitional//EN"\n"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">\n<html 
xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">\n<head>\n  
<title>BuildBot: SVNPoller-Demo</title>\n  <link href="buildbot.css" 
rel="stylesheet" type="text/css"/>\n</head>\n<body vlink="#800080">\n<table 
border="0" cellspacing="0">\n <tr class="LastBuild">\n  <td align="right" 
colspan="2" class="Project"><a href="xxx">SVNPoller-Demo</a><br />last 
build</td>\n  <td align="center" bgcolor="white" 
class="LastBuild">none</td>\n </tr>\n <tr class="Activity">\n  <td 
align="right" colspan="2">current activity</td>\n  <td align="center" 
bgcolor="red" class="Activity offline">offline</td>\n </tr>\n <tr>\n  <td 
align="center" class="Time">time (CEST)</td>\n  <td align="center" 
class="Change"><a href="changes">changes</a></td>\n  <td align="center" 
class="Builder"><a href="svnpolldemo">svnpolldemo</a></td>\n </tr>\n <tr>\n  
<td align="center" rowspan="2" valign="bottom" class="Time">17:16:03</td>\n  
<!-- commit bubble --><td rowspan="28"> </td>\n  <td align="center" 
rowspan="1" valign="top"> </td>\n </tr>\n <tr>\n  <td align="center" 
rowspan="1" valign="top" class="Event">master<br />started</td>\n </tr>\n 
<tr>\n  <td align="center" rowspan="2" valign="bottom" 
class="Time">16:54:30</td>\n  <td align="center" rowspan="1" 
valign="top"> </td>\n </tr>\n <tr>\n  <td align="center" rowspan="1" 
valign="top" class="Event">master<br />shutdown</td>\n </tr>\n <tr>\n  <td 
align="center" rowspan="4" valign="bottom" class="Time">15:54:19</td>\n  <td 
align="center" rowspan="1" valign="top"> </td>\n </tr>\n <tr>\n  <td 
align="center" rowspan="1" valign="top" class="Event">connect<br />ng</td>\n 
</tr>\n <tr>\n  <td align="center" rowspan="1" valign="top" 
class="Event">master<br />started</td>\n </tr>\n <tr>\n  <td align="center" 
rowspan="1" valign="top" class="Event">master<br />shutdown</td>\n </tr>\n 
<tr>\n  <td align="center" rowspan="5" valign="bottom" 
class="Time">15:53:38</td>\n  <td align="center" rowspan="1" 
valign="top"> </td>\n </tr>\n <tr>\n  <td align="center" rowspan="1" 
valign="top" class="Event">connect<br />ng</td>\n </tr>\n <tr>\n  <td 
align="center" rowspan="1" valign="top"> </td>\n </tr>\n <tr>\n  <td 
align="center" rowspan="1" valign="top" 
class="Event">master<br />started</td>\n </tr>\n <tr>\n  <td align="center" 
rowspan="1" valign="top" class="Event">master<br />shutdown</td>\n </tr>\n 
<tr>\n  <td align="center" rowspan="6" valign="bottom" 
class="Time">15:53:10</td>\n  <td align="center" rowspan="1" 
valign="top"> </td>\n </tr>\n <tr>\n  <td align="center" rowspan="1" 
valign="top" class="Event">connect<br />ng</td>\n </tr>\n <tr>\n  <td 
align="center" rowspan="1" valign="top"> </td>\n </tr>\n <tr>\n  <td 
align="center" rowspan="1" valign="top" 
class="Event">master<br />started</td>\n </tr>\n <tr>\n  <td align="center" 
rowspan="1" valign="top"> </td>\n </tr>\n <tr>\n  <td align="center" 
rowspan="1" valign="top" class="Event">master<br />shutdown</td>\n </tr>\n 
<tr>\n  <td align="center" rowspan="4" valign="bottom" 
class="Time">14:56:33</td>\n  <td align="center" rowspan="1" 
valign="top"> </td>\n </tr>\n <tr>\n  <td align="center" rowspan="1" 
valign="top" class="Event">connect<br />ng</td>\n </tr>\n <tr>\n  <td 
align="center" rowspan="1" valign="top" 
class="Event">master<br />started</td>\n </tr>\n <tr>\n  <td align="center" 
rowspan="1" valign="top" class="Event">master<br />shutdown</td>\n </tr>\n 
<tr>\n  <td align="center" rowspan="2" valign="bottom" 
class="Time">14:54:51</td>\n  <td align="center" rowspan="1" 
valign="top"> </td>\n </tr>\n <tr>\n  <td align="center" rowspan="1" 
valign="top" class="Event">connect<br />ng</td>\n </tr>\n <tr>\n  <td 
align="center" rowspan="3" valign="bottom" class="Time">14:54:28</td>\n  <td 
align="center" rowspan="1" valign="top"> </td>\n </tr>\n <tr>\n  <td 
align="center" rowspan="1" valign="top" 
class="Event">master<br />started</td>\n </tr>\n <tr>\n  <td align="center" 
rowspan="1" valign="top" class="Event">builder<br />created</td>\n </tr>\n 
<tr>\n  <td align="center" rowspan="9" valign="bottom" 
class="Time">13:20:12</td>\n  <td align="center" bgcolor="white" valign="top" 
class="Change"><a href="changes/9">niklaus</a></td>\n  <td align="center" 
rowspan="9">?</td>\n </tr>\n <tr>\n  <td align="center" bgcolor="white" 
valign="top" class="Change"><a href="changes/8">niklaus</a></td>\n </tr>\n 
<tr>\n  <td align="center" bgcolor="white" valign="top" class="Change"><a 
href="changes/7">niklaus</a></td>\n </tr>\n <tr>\n  <td align="center" 
bgcolor="white" valign="top" class="Change"><a 
href="changes/6">niklaus</a></td>\n </tr>\n <tr>\n  <td align="center" 
bgcolor="white" valign="top" class="Change"><a 
href="changes/5">niklaus</a></td>\n </tr>\n <tr>\n  <td align="center" 
bgcolor="white" valign="top" class="Change"><a 
href="changes/4">niklaus</a></td>\n </tr>\n <tr>\n  <td align="center" 
bgcolor="white" valign="top" class="Change"><a 
href="changes/3">niklaus</a></td>\n </tr>\n <tr>\n  <td align="center" 
bgcolor="white" valign="top" class="Change"><a 
href="changes/2">niklaus</a></td>\n </tr>\n <tr>\n  <td align="center" 
bgcolor="white" rowspan="1" valign="top" class="Change"><a 
href="changes/1">niklaus</a></td>\n </tr>\n</table>\n<hr />\n<a 
href="http://buildbot.sourceforge.net/">Buildbot</a>-0.7.2+ working for the 
<a href="xxx">SVNPoller-Demo</a> project.<br />\nPage built: Sat 20 May 2006 
17:17:01\n</body></html>\n'

How do I debug this?

Any hints would be greatly appreciated.

Thanks in advance.

--- 
Niklaus Giger
-------------- next part --------------
A non-text attachment was scrubbed...
Name: svnpoller.patch.bz2
Type: application/x-bzip2
Size: 5066 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20060520/ff2eee7e/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: test.log
Type: text/x-log
Size: 4133 bytes
Desc: not available
URL: <http://buildbot.net/pipermail/devel/attachments/20060520/ff2eee7e/attachment-0001.bin>
-------------- next part --------------
# -*- python -*-
# ex: set syntax=python:
# Simple Test fuer SVN-Poller
withSvnPoller = True
if withSvnPoller:
    from buildbot.changes import svnpoller
from buildbot.scheduler import Scheduler
from buildbot.process import step, factory
from buildbot.process.factory import s
from buildbot.status import html
from buildbot import locks
from buildbot.changes.pb import PBChangeSource

import socket
import private
reload(private) # make it possible to change the contents without a restart

c = BuildmasterConfig = {}
c = BuildmasterConfig = {}
c['bots'] = []
c['schedulers'] = []
c['builders'] = []
c['status'] = []
c['sources'] = []
c['slavePortnum'] = 4711
c['buildbotURL'] = "http://localhost/"
c['projectName'] = "SVNPoller-Demo"
c['projectURL'] = "xxx"

c['sources'].append(PBChangeSource())
c['status'].append(html.Waterfall(http_port=8010))
if withSvnPoller:
    for bot in private.bot_passwords.keys():
        c['bots'].append((bot, private.bot_passwords[bot]))
    c['buildbotURL'] = "http://localhost/xxx/"
    c['sources'] = [svnpoller.SVNSource("file:///tmp/svn_repo/tst",
                        pollinterval=15)]
    steps = [s(step.SVN, svnurl="file:///tmp/svn_repo/tst"),
	    s(step.ShellCommand, command="make all")
	    ]
    f = factory.BuildFactory(steps)
    slave_sim = socket.gethostname();
    b_svn = {'name': "svnpolldemo",
	      'slavename': slave_sim, 
	      'builddir': "quick-svn",
	      'factory': f,
	      }
    c['builders'] = [ b_svn ]
 


More information about the devel mailing list